mirror of
https://github.com/neovim/neovim.git
synced 2026-03-31 04:42:03 +00:00
fix(lsp): check nvim.lsp.enable before doautoall #36518
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user