Closed RaZ0rr-Two closed 2 years ago
I'm not sure what you mean here, the lightbulb shows up whenever there is a code action to perform at your cursor location, ie. if you see the lightbulb you'll get code actions to perform when you run vim.lsp.buf.code_action()
.
Sorry for lack of clarification. What I meant is that I would like to show the lightbulb shows up whenever there is a code action to perform. Not depending where the cursor is
I see. This is probably a duplicate (or at least similar to) #10. My response to that is this:
Hi, I doubt that is possible, since code actions are position dependant on the LSP server side, and the server will not return a code action for let's say, swapping function parameters if I ask for a code action for the entire line.
A workaround would be to ask the server for possible code actions for every single column on the line, but I feel that it would be very resource intensive and not worthwhile.
Let me know if I misunderstood.
I understood. If it makes the plugin more resource-intensive, I rather not have it
Could you help me with settings up options/autocommand to show light bulb whenever code actions are available and not just on
CursorHold
? Not showing bulb when cursor somewhere else Shows when cursor is there