diff options
| author | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-11-17 13:51:29 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-17 13:51:29 -0800 |
| commit | 5003b82def71e56f9c1bba05c1519b3a0949dbff (patch) | |
| tree | 29b6af265d0f245f43727f47883ffac3712db6c2 /lua | |
| parent | Fix docs and add util.once (#31) (diff) | |
| download | nvim-lspconfig-5003b82def71e56f9c1bba05c1519b3a0949dbff.tar nvim-lspconfig-5003b82def71e56f9c1bba05c1519b3a0949dbff.tar.gz nvim-lspconfig-5003b82def71e56f9c1bba05c1519b3a0949dbff.tar.bz2 nvim-lspconfig-5003b82def71e56f9c1bba05c1519b3a0949dbff.tar.lz nvim-lspconfig-5003b82def71e56f9c1bba05c1519b3a0949dbff.tar.xz nvim-lspconfig-5003b82def71e56f9c1bba05c1519b3a0949dbff.tar.zst nvim-lspconfig-5003b82def71e56f9c1bba05c1519b3a0949dbff.zip | |
Change root_dir for single instance servers (#33)
* Use os_homedir as root_dir for single instance servers.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim_lsp/bashls.lua | 2 | ||||
| -rw-r--r-- | lua/nvim_lsp/pyls.lua | 2 | ||||
| -rw-r--r-- | lua/nvim_lsp/texlab.lua | 2 | ||||
| -rw-r--r-- | lua/nvim_lsp/util.lua | 5 |
4 files changed, 3 insertions, 8 deletions
diff --git a/lua/nvim_lsp/bashls.lua b/lua/nvim_lsp/bashls.lua index a82e16a0..318181bb 100644 --- a/lua/nvim_lsp/bashls.lua +++ b/lua/nvim_lsp/bashls.lua @@ -15,7 +15,7 @@ skeleton[server_name] = { default_config = { cmd = {"bash-language-server", "start"}; filetypes = {"sh"}; - root_dir = util.once(vim.loop.cwd()); + root_dir = vim.loop.os_homedir; log_level = lsp.protocol.MessageType.Warning; settings = {}; }; diff --git a/lua/nvim_lsp/pyls.lua b/lua/nvim_lsp/pyls.lua index fac05197..36d63109 100644 --- a/lua/nvim_lsp/pyls.lua +++ b/lua/nvim_lsp/pyls.lua @@ -6,7 +6,7 @@ skeleton.pyls = { default_config = { cmd = {"pyls"}; filetypes = {"python"}; - root_dir = util.once(vim.loop.cwd()); + root_dir = vim.loop.os_homedir; log_level = lsp.protocol.MessageType.Warning; settings = {}; }; diff --git a/lua/nvim_lsp/texlab.lua b/lua/nvim_lsp/texlab.lua index 7580be3e..ab45d872 100644 --- a/lua/nvim_lsp/texlab.lua +++ b/lua/nvim_lsp/texlab.lua @@ -35,7 +35,7 @@ skeleton.texlab = { default_config = { cmd = {"texlab"}; filetypes = {"tex", "bib"}; - root_dir = util.once(vim.loop.cwd()); + root_dir = vim.loop.os_homedir; log_level = lsp.protocol.MessageType.Warning; settings = { latex = { diff --git a/lua/nvim_lsp/util.lua b/lua/nvim_lsp/util.lua index 19d0c250..a9ca5680 100644 --- a/lua/nvim_lsp/util.lua +++ b/lua/nvim_lsp/util.lua @@ -366,10 +366,5 @@ function M.utf8_config(config) return config end --- Returns a function which returns the same value forever. -function M.once(value) - return function() return value end -end - return M -- vim:et ts=2 sw=2 |
