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

Migration for Code Actions on Save #198141

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 17 additions & 17 deletions src/vs/editor/browser/config/migrateOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,23 +196,23 @@ registerEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value,
});

// Code Actions on Save
// registerEditorSettingMigration('codeActionsOnSave', (value, read, write) => {
// if (value && typeof value === 'object') {
// let toBeModified = false;
// const newValue = {} as any;
// for (const entry of Object.entries(value)) {
// if (typeof entry[1] === 'boolean') {
// toBeModified = true;
// newValue[entry[0]] = entry[1] ? 'explicit' : 'never';
// } else {
// newValue[entry[0]] = entry[1];
// }
// }
// if (toBeModified) {
// write(`codeActionsOnSave`, newValue);
// }
// }
// });
registerEditorSettingMigration('codeActionsOnSave', (value, read, write) => {
if (value && typeof value === 'object') {
let toBeModified = false;
const newValue = {} as any;
for (const entry of Object.entries(value)) {
if (typeof entry[1] === 'boolean') {
toBeModified = true;
newValue[entry[0]] = entry[1] ? 'explicit' : 'never';
} else {
newValue[entry[0]] = entry[1];
}
}
if (toBeModified) {
write(`codeActionsOnSave`, newValue);
}
}
});

// Migrate Quick Fix Settings
registerEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => {
Expand Down