mirror of
https://github.com/neovim/nvim-lspconfig
synced 2025-04-01 00:30:37 +00:00
fix(command): check server config exist in lspconfig (#3131)
This commit is contained in:
parent
559a7e8c6c
commit
ae0651d850
@ -100,12 +100,14 @@ api.nvim_create_user_command('LspRestart', function(info)
|
|||||||
100,
|
100,
|
||||||
vim.schedule_wrap(function()
|
vim.schedule_wrap(function()
|
||||||
for client_name, tuple in pairs(detach_clients) do
|
for client_name, tuple in pairs(detach_clients) do
|
||||||
local client, attached_buffers = unpack(tuple)
|
if require('lspconfig.configs')[client_name] then
|
||||||
if client.is_stopped() then
|
local client, attached_buffers = unpack(tuple)
|
||||||
for buf in pairs(attached_buffers) do
|
if client.is_stopped() then
|
||||||
require('lspconfig.configs')[client_name].launch(buf)
|
for _, buf in pairs(attached_buffers) do
|
||||||
|
require('lspconfig.configs')[client_name].launch(buf)
|
||||||
|
end
|
||||||
|
detach_clients[client_name] = nil
|
||||||
end
|
end
|
||||||
detach_clients[client_name] = nil
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user