Skip to content
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

Provide better completion for editor.codeActionsOnSave #161284

Closed
heejaechang opened this issue Sep 19, 2022 · 2 comments · Fixed by #215475
Closed

Provide better completion for editor.codeActionsOnSave #161284

heejaechang opened this issue Sep 19, 2022 · 2 comments · Fixed by #215475
Assignees
Labels
editor-code-actions Editor inplace actions (Ctrl + .) feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders on-testplan
Milestone

Comments

@heejaechang
Copy link

Currently, when user configure editor.codeActionsOnSave, this is what user sees.
image

It basically promotes users to write "source.fixAll": true if user wants any fix all to run on save.

problem is it assumes there is only 1 kind of source.fixAll from an extension. but like refactor has refactor.extract, refactor.inline and etc, one extension can provide multiple kinds of fix all code actions.

for example, pylance provides 2 fix all (and plan to add more)

  • source.fixAll.unusedImports
  • source.fixAll.convertImportFormat

but in current user experience, source.fixAll: true basically catch all option. any new fix all added will automatically picked up and run.

so, user basically need to check documentation every time when new version is released for extensions and check new fix all added and disable them if they don't want them.

It would be better if it works the other way around and "editor.codeActionsOnSave" actually show all fix all codeActions in completion so that user can enable each specific fix all they want rather than enable all and disable each specific one.

by the way, I see other extension such as eslint, tslint, stylelint, markdownlint's vscode extension expose only 1 fix all code action and use its own option to control what fix are run on fix all and apply them themselves.

if that is how it is supposed to work, it would be nice to document that in vscode doc and enforce to have only 1 fix all code action.

but even so, showing each fix all kind from each extension should still benefit users in case they want to disable fix all provider of an extension.

@mjbvz mjbvz self-assigned this Sep 19, 2022
@heejaechang
Copy link
Author

related item - #82718

@heejaechang
Copy link
Author

and this is how VS works

codecleanup

@mjbvz mjbvz added this to the Backlog milestone Sep 21, 2022
@mjbvz mjbvz added feature-request Request for new features or functionality editor-code-actions Editor inplace actions (Ctrl + .) labels Sep 22, 2022
@mjbvz mjbvz added the help wanted Issues identified as good community contribution opportunities label Dec 8, 2022
@justschen justschen self-assigned this Sep 29, 2023
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Jun 24, 2024
@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-code-actions Editor inplace actions (Ctrl + .) feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants