-
Notifications
You must be signed in to change notification settings - Fork 798
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
Add CodeAction class #389
Comments
Second this. @aeschli Current, the lsp CodeAction return a list of Command. It is hard to differentiate these commands. In test cases, we need do some filter based on the commands. |
+1 |
Seems very similar to proposal in #178 |
See also the discussion in #432. We should work on this sooner than later since it will make things a lot easier to understand when it comes to commands and code actions. |
New |
I just merged in the I'd like to get other extensions that have their own organize imports (such as java) to try to migrate over to using a code action instead. This is blocked until we have basic support for a |
I would like to work on this, however I've got some preliminary questions: |
The kind is a big reason we added the The One other point: we also added an |
Actually this got added to the VS Code May plan :-). @mickaelistria I still appreciating your help here. I will have a look beginning of next week and then add a proposal how I think we can best implement this. Knowing that the Java implementation solved this with an |
Here is a PR for a CodeAction type in the protocol: microsoft/vscode-languageserver-node#350 Clients need to opt into allowing Feedback welcome. |
@dbaeumer microsoft/vscode-languageserver-node#350 is merged. When will the vscode language server protocol spec will be updated? |
@yaohaizh sorry. Forgot about it in the endgame stress. Will do today. |
Thank you very much! |
You are welcome. |
I was having some trouble getting the "Organize Imports" command and "Source Action..." context menu item to show up in VSCode after implementing https://code.visualstudio.com/updates/v1_23#_codeactionprovidermetadata So if I understand correctly, a language server currently can't have proper "Organize Imports" support in VSCode because |
@Gama11 Was this the same problem you were seeing with microsoft/vscode#54803 ? |
No, both have to do with Code Action kinds, but this is unrelated. Basically, the Language Server Protocol is missing a way to for the server specifiy what kinds of code actions will be provided ( This is documented in the 1,23 release notes which I linked to earlier. I would have expected this to be part of |
VS Code 1.20 adds a new
CodeAction
type that captures additional information about codeactions:This new type is used by several new product features such as the
Refactor
command and theeditor.action.codeAction
command. It should also be supported in the LSP for code action providesThe text was updated successfully, but these errors were encountered: