Skip to content

Commit 5f795ad

Browse files
authored
feat: add lightbulb.ignore options (#1477)
1 parent 6f920cf commit 5f795ad

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

lua/lspsaga/codeaction/lightbulb.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ local function lb_autocmd()
100100
if not client.supports_method('textDocument/codeAction') then
101101
return
102102
end
103+
if vim.tbl_contains(config.lightbulb.ignore.clients, client.name) then
104+
return
105+
end
106+
if vim.tbl_contains(config.lightbulb.ignore.ft, vim.bo.filetype) then
107+
return
108+
end
103109

104110
local buf = opt.buf
105111
local group_name = name .. tostring(buf)

lua/lspsaga/init.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ local default_config = {
6060
sign_priority = 40,
6161
virtual_text = true,
6262
enable_in_insert = true,
63+
ignore = {
64+
clients = {},
65+
ft = {},
66+
},
6367
},
6468
scroll_preview = {
6569
scroll_down = '<C-f>',

0 commit comments

Comments
 (0)