From 344a76825f93cdc2ea252fb3b8c0dad6f5fe42bd Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Thu, 23 Mar 2023 05:48:00 +0100 Subject: refactor(bashls): migrate to a workspace config (#2520) As suggested by upstream, see bash-lsp/bash-language-server#599 > Environment variable configuration is being deprecated, please use workspace configuration. --- lua/lspconfig/server_configurations/bashls.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/bashls.lua b/lua/lspconfig/server_configurations/bashls.lua index 3f25c76f..eb190c3a 100644 --- a/lua/lspconfig/server_configurations/bashls.lua +++ b/lua/lspconfig/server_configurations/bashls.lua @@ -10,12 +10,17 @@ end return { default_config = { cmd = cmd, - cmd_env = { - -- 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)". - GLOB_PATTERN = vim.env.GLOB_PATTERN or '*@(.sh|.inc|.bash|.command)', + settings = { + bashIde = { + -- 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_PATTERN or '*@(.sh|.inc|.bash|.command)', + }, }, filetypes = { 'sh' }, root_dir = util.find_git_ancestor, -- cgit v1.2.3-70-g09d2