-
Notifications
You must be signed in to change notification settings - Fork 185
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
Suggestions for Source Action...
menu handling
#2066
Comments
Your two points make sense on the surface but what makes me a bit unsure is seeing how VSCode doesn't follow those. |
Maybe the
Personally I would be okay with removing "Format file" from the context menu. But probably it's not only about the file-level action, but should also depend on the expected usage frequence whether an entry should be included in the context menu. I guess most users run "Source Action..." only very rarely, while "Format file" is maybe used more often (and probably more often than "Format Selection", because it's simpler and not all servers are also documentRangeFormattingProvider). I would probably also remove "Expand Selection" from the context menu, add a def is_visible(self, event: Optional[dict] = None, point: Optional[int] = None) -> bool:
return self.is_enabled(event, point) method to all of the commands in order to hide them when not activated, and then remove the "LSP" submenu. |
This comment is related, it contains examples why sending the current selection makes sense #779 (comment) |
I've asked some related questions in microsoft/language-server-protocol#1554
It makes sense for normal code actions (especially the quickfix ones) as those depend on specific diagnostics and location. And we are sending selection range and all intersecting diagnostics in that case already.
|
From #2064 (comment):
The text was updated successfully, but these errors were encountered: