fix: lsp should work now
This commit is contained in:
@@ -105,6 +105,7 @@ local function send_did_change(bufnr, client_id)
|
||||
})
|
||||
end
|
||||
|
||||
-- Use vim.wait to allow the event loop to process LSP diagnostics
|
||||
local function wait_for_diagnostics(bufnr, timeout_ms)
|
||||
local done = false
|
||||
local result_diags = {}
|
||||
@@ -121,12 +122,9 @@ local function wait_for_diagnostics(bufnr, timeout_ms)
|
||||
end
|
||||
})
|
||||
|
||||
local waited = 0
|
||||
local interval = 50
|
||||
while not done and waited < timeout_ms do
|
||||
vim.cmd(("sleep %d m"):format(interval))
|
||||
waited = waited + interval
|
||||
end
|
||||
vim.wait(timeout_ms, function()
|
||||
return done
|
||||
end, 50)
|
||||
|
||||
pcall(api.nvim_del_augroup_by_id, augrp)
|
||||
return result_diags
|
||||
|
||||
Reference in New Issue
Block a user