From 653871da1b5507d3391239854982438872ad4032 Mon Sep 17 00:00:00 2001 From: Maria Solano Date: Tue, 11 Nov 2025 21:04:31 -0800 Subject: [PATCH] fix(lsp): check `nvim.lsp.enable` before `doautoall` #36518 --- runtime/lua/vim/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 3cdc9692ce..08a08fa8ce 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -581,7 +581,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