-
Notifications
You must be signed in to change notification settings - Fork 30k
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
vscode.workspace.applyEdit should honour the files.refactoring.autosave config #154079
Conversation
Hi @jrieken - I was wondering if you had an opinion on this? Is this a direction you think it would be good to go in? |
Sorry - I have been swapped recently and I am now heading out to a longer vacation. My plan is to finally pick this up in August. Thanks for being patient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This is looking good already but I left some comments here and there
Hi, Sorry I missed your replying to this FR - thanks for applying this change. A couple of comments: Should Regarding Perhaps we could remove the |
This PR fixes #112109
This adds a proposed api change, which adds a flag, specifying whether the applyEdit method in the vscode api should honour the
files.refactoring.autosave
config.This seems like it would be the appropriate fix for #112109 since we are giving extensions the option to honour the users preference.
I have also added a config option
minResourcesToAutosave
to the bulk edit options, since by default, it would only auto save if 2 or more files where changed, but this preference would result in some very confusing behaviour for extension authors, so by adding a config option, we can set that to 1 or more files when called by an extension.One potential issue is that, it seems like autosaving means that files aren't noted as being dirty and therefore don't open by default.
This is more a first pass at a solution than a proposed final result, but it would be good to discuss how you think we should surface this functionality.