From dac42c039a6bf5e5aabf6f35fae78eb2b167c703 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Wed, 15 Nov 2023 09:21:54 -0800 Subject: [PATCH] Configure bashls to not run shellcheck I was getting duplicate warnings from shellcheck because it was being run by bashls and null-ls --- neovim/lua/plugins/lsp.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/neovim/lua/plugins/lsp.lua b/neovim/lua/plugins/lsp.lua index 9641a8a..e37af47 100644 --- a/neovim/lua/plugins/lsp.lua +++ b/neovim/lua/plugins/lsp.lua @@ -279,9 +279,20 @@ function M.config_lsp() local default_setup = { capabilities = capabilities, on_attach = default_attach } -- Configure each server - lsp_config.bashls.setup(default_setup) lsp_config.gopls.setup(default_setup) lsp_config.pyright.setup(default_setup) + lsp_config.bashls.setup({ + capabilities = capabilities, + on_attach = default_attach, + settings = { + bashIde = { + -- Disable shellcheck linting because we have it enabled in null-ls + -- Some machines I use aren't configured with npm so bashls cannot + -- be relied on as the sole source of shellcheck linting. + shellcheckPath = "", + }, + }, + }) -- Set up rust analyzer (preferred) or rls -- TODO: Remove rls and all configuration for it when all machines are up to date