vscode.workspace.applyEdit should honour the files.refactoring.autosave config#154079
vscode.workspace.applyEdit should honour the files.refactoring.autosave config#154079jrieken merged 3 commits intomicrosoft:mainfrom
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. |
jrieken
left a comment
There was a problem hiding this comment.
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.autosaveconfig.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
minResourcesToAutosaveto 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.