-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Verify fix/revision to Code Actions on Save #194437
Comments
Closing this as completed. Waiting on insiders to verify. |
Issue marked as unreleased but unable to locate closing commit in issue timeline. You can manually reference a commit by commenting |
@justschen For notebooks I see only two choices, is this expected? |
Verified for editor code actions. I can't notebook code actions to work. @Yoyokrazy Could you provide steps to use |
Got it working with a Github Issue Notebook (thanks @jrieken): "notebook.codeActionsOnSave": {
"notebook.source.normalizeVariableNames":true
}
Otherwise works as described. |
@Yoyokrazy suggested change to support backward compatibility: if (context.reason === SaveReason.AUTO) {
//saveTrigger = 'always';
return undefined;
} or just remove entirely since it would be under the umbrella with atm, this code includes all code actions when the value is const includedActions = allCodeActions
.filter(x => setting[x.value] === saveTrigger || setting[x.value] === true); |
Thanks for the catch @chrmarti, PR mentioned here addresses this and |
@justschen is there any chance of changing the behavior to run the actions in order when using an object, or will that only be for using an array for the setting? I know the docs currently say to use an array when you need to execute in order, but that limits the actions to "explicit" |
@dockleryxk Regarding the fixes around #194861, this is something we may look into! atm, as you can see from #194861 (comment), we do explicitly force |
@justschen Sweet!!! I bring this up because a common workflow I've seen is running format with prettier and then following it with eslint to make some tweaks. Either way, thank you for going back and fixing the array version of the setting in #194870 :) |
tests #194031 and new changes from #194409. related to #194397
added back old boolean values (since we reverted the changes for migration) in addition to supporting new enum values.
This is for both Code Actions in notebooks and in the editor:
notebook.codeActionsOnSave
oreditor.codeActionsOnSave
always
currently does not support code actions on auto save after delay. (easiest code actions to test would besource.fixAll
andsource.organizeImports
. other code actions likesource.fixAll.eslint
andsource.removeUnusedImports
are supported as well.explicit
should be the same,false
andnever
should be the same. there are descriptions about future deprecation and behavior as well!)The text was updated successfully, but these errors were encountered: