Skip to content

Commit

Permalink
Configure shellcheck to use -x via lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Apr 16, 2024
1 parent 9037a2b commit 40b6cd1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion nvim/lua/conf/lspconfig/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ vim.opt.signcolumn = 'yes'

local lspconfig = require 'lspconfig'
lspconfig.ansiblels.setup {}
lspconfig.bashls.setup { filetypes = { "sh" } }
lspconfig.bashls.setup {
filetypes = { "sh" },
settings = {
diagnostics = {
enable = true,
shellcheck = {
enable = true,
executable = "shellcheck",
extraArgs = { "-x" }
}
}
}
}
lspconfig.docker_compose_language_service.setup {}
lspconfig.eslint.setup({
on_attach = function(client, bufnr)
Expand Down
2 changes: 1 addition & 1 deletion nvim/lua/conf/nvim-lint/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ l.linters_by_ft = {
lua = { 'selene' },
markdown = { 'markdownlint' },
-- perl = { 'perlimports' },
sh = { 'shellcheck' },
-- sh = { 'shellcheck' },
sql = { 'sqlfluff' },
typescript = { 'eslint'},
vim = { 'vint' },
Expand Down

0 comments on commit 40b6cd1

Please sign in to comment.