summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorChris <[email protected]>2021-03-19 00:10:21 -0400
committerChris <[email protected]>2021-03-19 00:10:21 -0400
commita7c77a04b50cb7603ff37d590895ddbff5a9865c (patch)
treef4001495c0e9b26a5b38f4c872fad4b8f94abcec /lua
parent7eea23bb6c2449675a11f762838a8656d5de0f62 (diff)
shellcheck and shfmt
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}
}
}
}