Closed utkarshgupta137 closed 1 year ago
This option isn't working for me
Hi. On the latest master I added a function to help debug lightbulb issues: https://github.com/kosayoda/nvim-lightbulb/issues/51#issuecomment-1629844759.
If the lightbulb is showing at a location when it shouldn't, please run the lightbulb's debug function and see what the types of code actions they are:
.
You can also pass in a different configuration to the debug
function to see whether or not the options apply, in my example if I call the function like this: :lua NvimLightbulb.debug({ action_kinds = { "quickfix" } })
, I get this:
If you're still having trouble, please open a new issue with more details.
EDIT: Make sure you've updated the plugin!
Error executing vim.schedule lua callback: ...are/nvim/lazy/nvim-lightbulb/lua/nvim-lightbulb/init.lua:405: attempt to concatenate field 'kind' (a nil value)
stack traceback:
...are/nvim/lazy/nvim-lightbulb/lua/nvim-lightbulb/init.lua:405: in function 'callback'
...eovim-unwrapped-0.9.1/share/nvim/runtime/lua/vim/lsp.lua:2021: in function 'handler'
...eovim-unwrapped-0.9.1/share/nvim/runtime/lua/vim/lsp.lua:1394: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
I'm getting this in Cargo.toml
with crates.nvim
plugin. I would personally prefer if the kind is unknown, then the lightbulb still be hidden, because right now, it is showing on every line.
Hello! Thank you for the PR and sorry it took so long to get back. The idea is wonderful, but I've modified it to allow specifying any LSP CodeActionKind.
In the latest release, you can now set
action_kinds = { "quickfix" }
to only show the lightbulb if there is a quickfix code action.Thanks again!