summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/lsp/efm-general-ls.lua16
1 files changed, 14 insertions, 2 deletions
diff --git a/lua/lsp/efm-general-ls.lua b/lua/lsp/efm-general-ls.lua
index d771d898..ab6359b5 100644
--- a/lua/lsp/efm-general-ls.lua
+++ b/lua/lsp/efm-general-ls.lua
@@ -24,17 +24,29 @@ local eslint = {
formatStdin = true
}
+local shellcheck = {
+ LintCommand = 'shellcheck -f gcc -x',
+ lintFormats = {'%f:%l:%c: %trror: %m', '%f:%l:%c: %tarning: %m', '%f:%l:%c: %tote: %m'}
+}
+
+local shfmt = {
+ formatCommand = 'shfmt -ci -s -bn',
+ formatStdin = true
+}
+
+
require"lspconfig".efm.setup {
-- init_options = {initializationOptions},
init_options = {documentFormatting = true, codeAction = false},
- filetypes = {"lua", "python", "javascriptreact", "javascript"},
+ filetypes = {"lua", "python", "javascriptreact", "javascript", "sh"},
settings = {
rootMarkers = {".git/"},
languages = {
lua = {luaFormat},
python = {isort, yapf},
javascriptreact = {prettier, eslint},
- javascript = {prettier, eslint}
+ javascript = {prettier, eslint},
+ sh = {shellcheck, shfmt}
}
}
}