diff options
| author | Hirokazu Hata <h.hata.ai.t@gmail.com> | 2020-02-16 14:46:14 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-16 14:46:14 +0900 |
| commit | 7281d73717fec01440d62d7331a664290b72a6fa (patch) | |
| tree | 22e07c08faffc0a2b9bd8763ce13c18e9e462cd0 /lua/nvim_lsp/configs.lua | |
| parent | Merge pull request #122 from kdheepak/kd/add-nimls (diff) | |
| parent | added neovim's editorconfig (diff) | |
| download | nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar.gz nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar.bz2 nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar.lz nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar.xz nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.tar.zst nvim-lspconfig-7281d73717fec01440d62d7331a664290b72a6fa.zip | |
Merge pull request #120 from teto/checkhealth
[RDY] checkhealth: add checkhealth nvim_lsp command
Diffstat (limited to 'lua/nvim_lsp/configs.lua')
| -rw-r--r-- | lua/nvim_lsp/configs.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lua/nvim_lsp/configs.lua b/lua/nvim_lsp/configs.lua index 7733bf42..477eb6a3 100644 --- a/lua/nvim_lsp/configs.lua +++ b/lua/nvim_lsp/configs.lua @@ -93,7 +93,8 @@ function configs.__newindex(t, config_name, config_def) end M.manager = nil end - local manager = util.server_per_root_dir_manager(function(_root_dir) + + local make_config = function(_root_dir) local new_config = vim.tbl_extend("keep", {}, config) -- Deepcopy anything that is >1 level nested. new_config.settings = vim.deepcopy(new_config.settings) @@ -146,8 +147,14 @@ function configs.__newindex(t, config_name, config_def) )) end end) + + new_config.root_dir = _root_dir return new_config - end) + end + + local manager = util.server_per_root_dir_manager(function(_root_dir) + return make_config(_root_dir) + end) function manager.try_add() local root_dir = get_root_dir(api.nvim_buf_get_name(0), api.nvim_get_current_buf()) @@ -159,6 +166,7 @@ function configs.__newindex(t, config_name, config_def) end M.manager = manager + M.make_config = make_config end function M._setup_buffer(client_id) |
