diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index cec325f6b0..3dc5f2ba5e 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -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