diff options
| author | glepnir <glephunter@gmail.com> | 2025-05-04 21:07:11 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-04 06:07:11 -0700 |
| commit | 91e116f3a6719e9dc7652f4e0a4b1760dfbf1af0 (patch) | |
| tree | c4a18cd0c6ba0b592ee3cb17cf786e7633532813 /runtime/lua/vim | |
| parent | cb2ca54331cdd089a6f018a933c6fc2be7f417d3 (diff) | |
| download | rneovim-91e116f3a6719e9dc7652f4e0a4b1760dfbf1af0.tar.gz rneovim-91e116f3a6719e9dc7652f4e0a4b1760dfbf1af0.tar.bz2 rneovim-91e116f3a6719e9dc7652f4e0a4b1760dfbf1af0.zip | |
fix(lsp): only auto-detach lsp.config clients #33834
Problem:
enable() routine detaches clients even if they were manually started
and not managed by vim.lsp.config.
Solution:
Skip clients that aren't managed by vim.lsp.config.
Diffstat (limited to 'runtime/lua/vim')
| -rw-r--r-- | runtime/lua/vim/lsp.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index cb711859da..a641e78510 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -547,7 +547,7 @@ local function lsp_enable_callback(bufnr) -- Stop any clients that no longer apply to this buffer. local clients = lsp.get_clients({ bufnr = bufnr, _uninitialized = true }) for _, client in ipairs(clients) do - if not can_start(bufnr, client.name, lsp.config[client.name]) then + if lsp.config[client.name] and not can_start(bufnr, client.name, lsp.config[client.name]) then lsp.buf_detach_client(bufnr, client.id) end end |