mirror of
https://github.com/neovim/neovim.git
synced 2025-12-18 20:35:41 +00:00
fix(lsp): check nvim.lsp.enable before doautoall #36518
(cherry picked from commit 653871da1b)
This commit is contained in:
committed by
github-actions[bot]
parent
ae25f6942e
commit
890c257194
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user