diff --git a/bootstrap/packages.txt b/bootstrap/packages.txt index 1e2d1c6..1ebd8d5 100644 --- a/bootstrap/packages.txt +++ b/bootstrap/packages.txt @@ -34,6 +34,7 @@ docx2txt duf dunst dust +efm-langserver entr evince exa @@ -214,6 +215,7 @@ vagrant vi vifm vim-language-server +vimiv visidata xcape xclip diff --git a/nvim/.config/nvim/lua/plug/_lsp.lua b/nvim/.config/nvim/lua/plug/_lsp.lua index 36bcee2..20f81dd 100644 --- a/nvim/.config/nvim/lua/plug/_lsp.lua +++ b/nvim/.config/nvim/lua/plug/_lsp.lua @@ -111,6 +111,32 @@ end -- set up simple servers for _, lsp in ipairs(servers) do lspcfg[lsp].setup {on_attach = on_attach} end +lspcfg.efm.setup { + on_attach = on_attach, + init_options = { + documentFormatting = true, + codeAction = true, + completion = true, + documentSymbol = true, + hover = true + }, + filetypes = {"sh"}, + settings = { + rootMarkers = {".git/"}, + languages = { + sh = { + { + lintCommand = 'shellcheck -f gcc -x', + lintFormats = { + '%f:%l:%c: %trror: %m', '%f:%l:%c: %tarning: %m', + '%f:%l:%c: %tote: %m' + } + }, {formatCommand = 'shfmt -ci -s -bn', formatStdin = true} + } + } + } +} + -- requires the lua-language-server package to be installed -- The arch package defaults to the following directory local sumneko_root_path = "/usr/share/lua-language-server"