You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When typing class/module and continuing on, ruby-lsp offers existing classes/modules as autocomplete. This is a nice idea, however I find it highly annoying in basically all cases:
Aufzeichnung.2024-07-19.110648.mp4
Basically, I can't use enter in most of the cases here and have to either remember to press escape beforehand or undo the autocomplete after it happened.
I think, an ok solution may be to insert what was currently typed as the first suggestion. Or maybe to not offer third-party classes/modules here (but even then you will be at the innermost layer at one point which then will contain an identifier not yet indexed), most of the time you're not reopening third-party classes/modules. Not sure what the best thing to do is, I just know I'm unhappy with how it currently works.
The text was updated successfully, but these errors were encountered:
Thank you for the report! You're right, the experience is not great when creating new classes or modules.
The team discussed this and we're slightly torn between not showing completion at all while declaring the class/module and your clever suggestion of showing the constant you're typing as a candidate.
If you're interested in contributing, we'd love to see what the experience would be like with the approach you suggested. It would be nice to also show to the user that the completion item refers to the thing they are typing at that moment and not some other declaration (maybe we can use label details for that).
Description
Reproduction steps
When typing
class/module
and continuing on,ruby-lsp
offers existing classes/modules as autocomplete. This is a nice idea, however I find it highly annoying in basically all cases:Aufzeichnung.2024-07-19.110648.mp4
Basically, I can't use enter in most of the cases here and have to either remember to press escape beforehand or undo the autocomplete after it happened.
I think, an ok solution may be to insert what was currently typed as the first suggestion. Or maybe to not offer third-party classes/modules here (but even then you will be at the innermost layer at one point which then will contain an identifier not yet indexed), most of the time you're not reopening third-party classes/modules. Not sure what the best thing to do is, I just know I'm unhappy with how it currently works.
The text was updated successfully, but these errors were encountered: