Add bashls and format using formatter built into lua lsp

This commit is contained in:
Fabian Schmidt 2022-10-18 17:42:03 +02:00
parent a8818ea92a
commit fe9da6af57
8 changed files with 84 additions and 80 deletions

View File

@ -1,6 +1,6 @@
-- init.lua
require'plugins'
require'settings'.init()
require'maps'.init()
require'commands'
require('plugins')
require('settings').init()
require('maps').init()
require('commands')

View File

@ -1,7 +1,7 @@
-- plugin.lua
require "paq" {
require 'paq' {
-- Handle itself
'savq/paq-nvim';

View File

@ -1,8 +1,8 @@
-- Completion
local completion = {}
local cmp = require'cmp'
local lspkind = require'lspkind'
local cmp = require('cmp')
local lspkind = require('lspkind')
vim.opt.shortmess:append 'c'

View File

@ -38,10 +38,10 @@ end
function settings.init()
settings.initMisc()
settings.initVimWiki()
require'settings.theme'.init()
require'settings.lsp'.init()
require'settings.completion'
require'settings.tree'
require('settings.theme').init()
require('settings.lsp').init()
require('settings.completion')
require('settings.tree')
end
return settings

View File

@ -20,11 +20,11 @@ local lsp_attach = function(client, buf)
end
function lsp.init()
require'mason'.setup()
require'mason-lspconfig'.setup()
require('mason').setup()
require('mason-lspconfig').setup()
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
local lspconfig = require'lspconfig'
local lspconfig = require('lspconfig')
lspconfig.sumneko_lua.setup {
capabilities = capabilities,
@ -56,6 +56,10 @@ function lsp.init()
standalone = false
}
})
lspconfig.bashls.setup {
capabilities = capabilities,
on_attach = lsp_attach
}
end
return lsp

View File

@ -7,11 +7,11 @@ function theme.initFont()
end
function theme.lsp_status()
require'fidget'.setup {}
require('fidget').setup {}
end
function theme.initStatusline()
require'lualine'.setup {
require('lualine').setup {
options = {
theme = 'onedark'
}

View File

@ -2,7 +2,7 @@
local tree = {}
require'nvim-tree'.setup {
require('nvim-tree').setup {
disable_netrw = true,
hijack_netrw = true,
open_on_setup = false,