|
|
|
@ -288,6 +288,7 @@ local function wait_lsp_startup(ft, retry, lsp_opts)
|
|
|
|
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
|
|
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
|
|
|
|
|
|
|
|
|
for _ = 1, 2 do
|
|
|
|
|
for _, client in ipairs(clients) do
|
|
|
|
|
if client ~= nil then
|
|
|
|
|
table.insert(loaded, client.name)
|
|
|
|
@ -318,7 +319,7 @@ local function wait_lsp_startup(ft, retry, lsp_opts)
|
|
|
|
|
--
|
|
|
|
|
local timer = vim.loop.new_timer()
|
|
|
|
|
local i = 0
|
|
|
|
|
timer:start(1000, 200, function()
|
|
|
|
|
vim.wait(1000, function()
|
|
|
|
|
clients = vim.lsp.get_active_clients() or {}
|
|
|
|
|
i = i + 1
|
|
|
|
|
if i > 5 or #clients > 0 then
|
|
|
|
@ -328,7 +329,8 @@ local function wait_lsp_startup(ft, retry, lsp_opts)
|
|
|
|
|
return true
|
|
|
|
|
end
|
|
|
|
|
_Loading = false
|
|
|
|
|
end)
|
|
|
|
|
end, 300)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local function setup(user_opts)
|
|
|
|
|