Add code_action_picker command - #9875
Conversation
|
Okay, I have fixed the PR to fix the workflow. Clippy is now happy. |
|
Thanks for this PR! For me this feature is really important because my primary use case for code actions is importing a class in Scala. And often there are a lot of classes with the same name coming from different package. Being able to use picker to select them would bring a lot of value |
| let Some(language_server) = editor.language_server_by_id(language_server_id) | ||
| else { | ||
| editor.set_error("Language Server disappeared"); | ||
| return; | ||
| }; |
There was a problem hiding this comment.
Out of curiosity: Is that really the default formatting style for let ... else {}? My brain needed some time to understand what else was doing there.
I was more expecting something like this:
| let Some(language_server) = editor.language_server_by_id(language_server_id) | |
| else { | |
| editor.set_error("Language Server disappeared"); | |
| return; | |
| }; | |
| let Some(language_server) = editor.language_server_by_id(language_server_id) else { | |
| editor.set_error("Language Server disappeared"); | |
| return; | |
| }; |
But could be just me and that I'm still a bit unfamiliar with it or that it's just a style-thingy.
|
can we resurrect this PR ? this feature would indeed facilitate imports resolution, for now it is most of the time faster for me to type the imports than trying to find it in the menu in your mono-repo. |
Fixes #3502, adding a separate command
code_action_pickerwhich openscode_actionbut in a picker, allowing for searching.An Asciinema recording
Apologies for my slow computer loading lsp in this recording, but here is a demonstration of the functionality provided by this MR:
Asciinema recording; lsp loads at 0:25