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
{{ message }}
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.
Hi, I'm on the VS Code team. We are exploring extending VS Code's code actions to support automatic fixes and auto fix on save. You can find the two current proposal here
Your extension is a large user of code actions so we'd appreciate your feedback on these API proposals. Here are example use cases for these two areas:
For auto fix: I write the python 3 code print "hello world" and see red squiggle in the editor. I F8 to the error and then use a single keyboard shortcut to auto add the parens for the print expression print("hello world"). This fix has been marked as the preferred auto fix by your extension. Other alternative fixes could be provided in the existing lightbulb menu
For fix all: I forget I'm writing python and start adding semi colons at the end of every line. Thankfully, I've enabled "editor.codeActionsOnSave": { "source.autoFix": true } and your extension provides an autofix code action. This autofix action looks through the entire document and fixes all trivial errors (such as removing semicolons in safe places) in a single pass. So all I need to do is save the document and all the semicolons go away
This guide covers how to use VS Code's proposed APIs. Please let me know if you have any questions about these proposals, feedback on the API, or ideas for other auto-fix scenarios that you would like to see supported in VS Code
The text was updated successfully, but these errors were encountered:
We have code actions for a few things (specifically quick fixes related to diagnostics for adding imports). AFAIK this issue is old and was created just to notify us that these were being added to provide feedback (which is moot given auto-fix-on-save was finalized and has been around for a while), and any other improvements would be specific changes. I'm just cleaning the issue tracker.
I understand. I hope you take a look at these apis at some point though as they can really improve the editing experience for advanced users (both are also in the LSP)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@mjbvz commented on Wed Jan 16 2019
Hi, I'm on the VS Code team. We are exploring extending VS Code's code actions to support automatic fixes and auto fix on save. You can find the two current proposal here
Your extension is a large user of code actions so we'd appreciate your feedback on these API proposals. Here are example use cases for these two areas:
For auto fix: I write the python 3 code
print "hello world"
and see red squiggle in the editor. I F8 to the error and then use a single keyboard shortcut to auto add the parens for the print expressionprint("hello world")
. This fix has been marked as the preferred auto fix by your extension. Other alternative fixes could be provided in the existing lightbulb menuFor fix all: I forget I'm writing python and start adding semi colons at the end of every line. Thankfully, I've enabled
"editor.codeActionsOnSave": { "source.autoFix": true }
and your extension provides anautofix
code action. This autofix action looks through the entire document and fixes all trivial errors (such as removing semicolons in safe places) in a single pass. So all I need to do is save the document and all the semicolons go awayThis guide covers how to use VS Code's proposed APIs. Please let me know if you have any questions about these proposals, feedback on the API, or ideas for other auto-fix scenarios that you would like to see supported in VS Code
The text was updated successfully, but these errors were encountered: