Closed ii14 closed 3 years ago
Thank you for the PR. I can't seem to reproduce the issue you mentioned. Can you give me an example workflow where the lightbulb shows up where it's not supposed to? Not to say that it's not a good idea to get the buffer only at the start, I'll review and merge as soon as possible.
Maybe that's because I call it very often, on CursorMoved
event.
au CursorMoved * lua require 'nvim-lightbulb'.update_lightbulb()
Maybe that's because I call it very often, on
CursorMoved
event.
That makes a lot of sense, thank you for the improvement!
When you're currently on a line with available code action and then open a new window from that line (eg.
:help
), the sign can be placed on another buffer, because_update*
functions always use the current buffer. This PR fixes this bug by passing the buffer handle to the handler function when the codeAction request is made.