-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: 💡 Light bulb on code actions 💡 #2011
Comments
We can probably do this in the idle timeout that's also used for completion. Would also be a good place to trigger documentHighlights https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentHighlight |
While i like the feature itself, it can also be distracting depending on the scope of code actions sent by the server. rust-analyzer for example has code actions for flipping a binary comparison when the cursor is on a |
How about a
|
Yeah, that's the main UX problem with 💡 in the limit, there's an infinite amount of assists for all imaginable cases, and it's hard to teach the user what's available. One idea I had a while back, is to create a tutorial-like experience, with the editor maintaining the set of code actions which the user invoked at least once. That way, a 💡 is shown only for "new" assists. This allows to both:
|
UI-wise, a less noisy option is to show 💡 in the modline. |
@matklad A long time has passed since this thread was created, now we have an event system would it be easier to implement the lightbulb, are you still using Helix and is this something you might consider doing a PR for at some point? Just a simple lightbulb with the ability to turn it on and off in the config would be amazing :) |
No, I am not planning to do any actual work in this area :) |
At the moment there is no way to discover if a code action exists other than moving around pressing
space a
. In Neovim this simple plugin https://github.com/kosayoda/nvim-lightbulb shows a little lightbulb when there is a code action available on your cursor position.It would be great to have this in Helix!
The text was updated successfully, but these errors were encountered: