mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 03:39:23 +00:00
Rename CodeAction.canAutoApply -> CodeAction.preferred
Part of #62110 Use the more generic name as suggested in https://github.com/Dart-Code/Dart-Code/issues/1393. This makes the intent of the field more clear and also allows us to extend the concept of preferred code actions to refactorings and other classes of code actions Experimentally also allows a `preferred` value for `apply` when configuring code aciton keyboard shortcuts. This applies the preferred code action returned from the list of code actions returned
This commit is contained in:
@@ -270,7 +270,7 @@ class TypeScriptQuickFixProvider implements vscode.CodeActionProvider {
|
||||
title: ''
|
||||
};
|
||||
if (tsAction.fixName === 'spelling') {
|
||||
codeAction.canAutoApply = true;
|
||||
codeAction.isPreferred = true;
|
||||
}
|
||||
return codeAction;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user