nvim: Add efm languageserver
Added a general purpose languageserver to round out the language server possibilities. For now only configured to take care of bash linting (using shellcheck) and formatting, but can be extended to a variety of other languages (even helping more prosaic forms like markdown and pandoc).
This commit is contained in:
parent
176a4a233d
commit
d0e083b6ab
2 changed files with 28 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue