Skip to content

Commit a8b24b2

Browse files
committed
fix(lightbulb): check user_data.lsp not empty
1 parent 7a1f796 commit a8b24b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/lspsaga/codeaction/lightbulb.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,13 @@ local function tags_vim_to_lsp(diagnostic)
7575
end
7676
return tags
7777
end
78+
7879
local function diagnostic_vim_to_lsp(diagnostics)
7980
---@param diagnostic vim.Diagnostic
8081
---@return lsp.Diagnostic
8182
return vim.tbl_map(function(diagnostic)
8283
local user_data = diagnostic.user_data or {}
83-
if user_data.lsp then
84+
if user_data.lsp and not vim.tbl_isempty(user_data.lsp) then
8485
return user_data.lsp
8586
end
8687
return {

0 commit comments

Comments
 (0)