aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim_lsp/bashls.lua
diff options
context:
space:
mode:
authorPeter Lithammer <peter.lithammer@gmail.com>2020-03-20 23:13:55 +0100
committerPeter Lithammer <peter.lithammer@gmail.com>2020-03-20 23:13:55 +0100
commit74f643f807a420d6750f56d8dd7cb62b608fe83f (patch)
treeb5051c8a279130d6584e713d1854df628028f111 /lua/nvim_lsp/bashls.lua
parent[docgen] Update README.md (diff)
downloadnvim-lspconfig-74f643f807a420d6750f56d8dd7cb62b608fe83f.tar
nvim-lspconfig-74f643f807a420d6750f56d8dd7cb62b608fe83f.tar.gz
nvim-lspconfig-74f643f807a420d6750f56d8dd7cb62b608fe83f.tar.bz2
nvim-lspconfig-74f643f807a420d6750f56d8dd7cb62b608fe83f.tar.lz
nvim-lspconfig-74f643f807a420d6750f56d8dd7cb62b608fe83f.tar.xz
nvim-lspconfig-74f643f807a420d6750f56d8dd7cb62b608fe83f.tar.zst
nvim-lspconfig-74f643f807a420d6750f56d8dd7cb62b608fe83f.zip
bashls: Change root_dir to pwd
The bash language server (if provided) will try to initialize all shell files it can find in the `root_dir`. The takes forever and probably isn't great from a security perspective. > If the rootPath is provided it will initialize all shell files it can > find anywhere on that path. This non-exhaustive glob is used to > preload the parser. https://github.com/bash-lsp/bash-language-server/blob/790f5a5203af62755d6cec38ef1620e2b2dc0dcd/server/src/analyser.ts#L33-L35
Diffstat (limited to 'lua/nvim_lsp/bashls.lua')
-rw-r--r--lua/nvim_lsp/bashls.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim_lsp/bashls.lua b/lua/nvim_lsp/bashls.lua
index f8d00e9e..68651e32 100644
--- a/lua/nvim_lsp/bashls.lua
+++ b/lua/nvim_lsp/bashls.lua
@@ -14,7 +14,7 @@ configs[server_name] = {
default_config = {
cmd = {"bash-language-server", "start"};
filetypes = {"sh"};
- root_dir = vim.loop.os_homedir;
+ root_dir = util.path.dirname;
};
on_new_config = function(new_config)
local install_info = installer.info()