mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
Prototype auto fixable quick fixes
Part of #62110 - Adds a new field `canAutoApply` to code actions. This field indicates that a code action can be applied without additional user input. For quick fixes, this should be set if the fix properly addresses the error - Enable auto fixes for TS spelling errors - Added a `editor.action.autoFix` command to triggers auto fixes at the current cursor position
This commit is contained in:
@@ -864,6 +864,7 @@ export interface CodeActionDto {
|
||||
diagnostics?: IMarkerData[];
|
||||
command?: modes.Command;
|
||||
kind?: string;
|
||||
canAutoApply?: boolean;
|
||||
}
|
||||
|
||||
export interface ExtHostLanguageFeaturesShape {
|
||||
|
||||
@@ -342,7 +342,8 @@ class CodeActionAdapter {
|
||||
command: candidate.command && this._commands.toInternal(candidate.command),
|
||||
diagnostics: candidate.diagnostics && candidate.diagnostics.map(typeConvert.Diagnostic.from),
|
||||
edit: candidate.edit && typeConvert.WorkspaceEdit.from(candidate.edit),
|
||||
kind: candidate.kind && candidate.kind.value
|
||||
kind: candidate.kind && candidate.kind.value,
|
||||
canAutoApply: candidate.canAutoApply,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user