fix(lsp): check nvim.lsp.enable before doautoall #36518

(cherry picked from commit 653871da1b)
This commit is contained in:
Maria Solano
2025-11-12 06:40:09 +00:00
committed by github-actions[bot]
parent ae25f6942e
commit 890c257194
+1 -1
View File
@@ -632,7 +632,7 @@ function lsp.enable(name, enable)
-- Ensure any pre-existing buffers start/stop their LSP clients.
if enable ~= false then
if vim.v.vim_did_enter == 1 then
if vim.v.vim_did_enter == 1 and next(lsp._enabled_configs) then
vim.cmd.doautoall('nvim.lsp.enable FileType')
end
else