You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I am quickly modifying and saving shell scripts, especially those with references to other scripts, the number of shellcheck processes running in the background stack up. If I am not careful, it will use too much memory on my machine until they have completed or I pkill -9 shellcheck.
['bashls'] =function()
lspconfig.bashls.setup({
filetypes= { 'sh', 'bash' },
settings= {
-- see https://github.com/bash-lsp/bash-language-server/blob/main/server/src/config.tsbashIde= {
backgroundAnalysisMaxFiles=500,
-- Glob pattern for finding and parsing shell script files in the workspace.-- Used by the background analysis features across files.-- Prevent recursive scanning which will cause issues when opening a file-- directly in the home directory (e.g. ~/foo.sh).---- Default upstream pattern is "**/*@(.sh|.inc|.bash|.command)".globPattern=vim.env.GLOB_PATTERNor'*@(.sh|.inc|.bash|.command)',
shellcheckArguments=''
},
}
})
Demo of the problem when --external-soucres is set:
shellcheck.mov
What is the feature you are proposing to solve the problem?
an option to override shellcheck arguments instead of appending arguments. Currently, shellCheckArguments appends to the existing defaults --shell --format --external-sources.
What is the problem this feature will solve?
When I am quickly modifying and saving shell scripts, especially those with references to other scripts, the number of shellcheck processes running in the background stack up. If I am not careful, it will use too much memory on my machine until they have completed or I
pkill -9 shellcheck.I'm on a Mac and using Neovim.
Setup: I am using mason-lspconfig.nvim and nvim-lspconfig with the following configuration for bash-language-server
Demo of the problem when
--external-soucresis set:shellcheck.mov
What is the feature you are proposing to solve the problem?
I would like to have an option to either
--external-sourceshttps://www.shellcheck.net/wiki/Directive#external-sourcesshellCheckArgumentsappends to the existing defaults--shell --format --external-sources.The
--external-sourcesflag is being set at:https://github.com/bash-lsp/bash-language-server/blob/1740dd4aa1707ec2205252caeb1fb190222fca3a/server/src/shellcheck/index.ts#LL125C15-L125C15
What alternatives have you considered?
Workaround:
Add the following configuration to
$XDG_CONFIG_HOME/shellcheckrcor~/.shellcheckrc