Revert "improve launching time"

This reverts commit b08bfd6839.
neovim_0_5
ray-x 3 years ago
parent 0d29116b18
commit f16893fc4f

@ -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)

@ -115,11 +115,12 @@ local function set_mapping(user_opts)
end
if ccls then
-- log("override ccls", ccls_mappings)
log("override ccls", ccls_mappings)
for _, value in pairs(ccls_mappings) do
f = "<Cmd>lua " .. value.func .. "<CR>"
local k = value.key
local m = value.mode or "n"
log(f, k, m)
set_keymap(m, k, f, opts)
end
end

@ -268,7 +268,7 @@ function M.locations_to_items(locations)
item.range = locations[i].range
if is_win then
log(item.uri) -- file:///C:/path/to/file
log(item.uri)
log(cwd)
end
-- only load top 30 file.

Loading…
Cancel
Save