|
|
|
@ -32,10 +32,12 @@ local function location_handler(opts, cb, _, result)
|
|
|
|
|
for _, entry in ipairs(items) do
|
|
|
|
|
entry = core.make_entry_lcol(opts, entry)
|
|
|
|
|
entry = core.make_entry_file(opts, entry)
|
|
|
|
|
if entry then
|
|
|
|
|
cb(entry, function(err)
|
|
|
|
|
if err then return end
|
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local function symbol_handler(opts, cb, _, result)
|
|
|
|
@ -47,10 +49,12 @@ local function symbol_handler(opts, cb, _, result)
|
|
|
|
|
end
|
|
|
|
|
entry = core.make_entry_lcol(opts, entry)
|
|
|
|
|
entry = core.make_entry_file(opts, entry)
|
|
|
|
|
if entry then
|
|
|
|
|
cb(entry, function(err)
|
|
|
|
|
if err then return end
|
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local function code_action_handler(opts, cb, _, code_actions)
|
|
|
|
@ -70,6 +74,7 @@ local function diagnostics_handler(opts, cb, _, entry)
|
|
|
|
|
local type = entry.type
|
|
|
|
|
entry = core.make_entry_lcol(opts, entry)
|
|
|
|
|
entry = core.make_entry_file(opts, entry)
|
|
|
|
|
if not entry then return end
|
|
|
|
|
if opts.lsp_icons and opts.cfg.icons[type] then
|
|
|
|
|
local severity = opts.cfg.icons[type]
|
|
|
|
|
local icon = severity.icon
|
|
|
|
@ -424,7 +429,6 @@ M.diagnostics = function(opts)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
for bufnr, diags in pairs(buffer_diags) do
|
|
|
|
|
if not opts.cwd_only or (opts.cwd_only and string.find(vim.api.nvim_buf_get_name(bufnr), vim.loop.cwd(), 1, true) ) then
|
|
|
|
|
for _, diag in ipairs(diags) do
|
|
|
|
|
-- workspace diagnostics may include empty tables for unused bufnr
|
|
|
|
|
if not vim.tbl_isempty(diag) then
|
|
|
|
@ -435,7 +439,6 @@ M.diagnostics = function(opts)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
-- coroutine.yield()
|
|
|
|
|
-- close the pipe to fzf, this
|
|
|
|
|
-- removes the loading indicator in fzf
|
|
|
|
|