Skip to content

Commit a972e7a

Browse files
committed
Flexible actions
1 parent 04fcbfe commit a972e7a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/actions/EditNewLine.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import {
88
import { commands, Selection } from "vscode";
99

1010
class EditNewLine implements Action {
11-
getTargetPreferences: () => ActionPreferences[] = () => [{ insideOutsideType: "inside" }];
11+
getTargetPreferences: () => ActionPreferences[] = () => [
12+
{ insideOutsideType: "inside" },
13+
];
1214

1315
constructor(private graph: Graph, private isAbove: boolean) {
1416
this.run = this.run.bind(this);
@@ -62,11 +64,18 @@ class EditNewLine implements Action {
6264
}
6365

6466
export class EditNewLineAbove extends EditNewLine {
67+
static id: string = "editNewLineAbove";
68+
static alternateIds: string[] = [];
69+
static defaultSpokenForm: string = "drink";
70+
static scope = { langIds: ["typescript"] };
71+
6572
constructor(graph: Graph) {
6673
super(graph, true);
6774
}
6875
}
6976

77+
registerAction(EditNewLineAbove);
78+
7079
export class EditNewLineBelow extends EditNewLine {
7180
constructor(graph: Graph) {
7281
super(graph, false);

0 commit comments

Comments
 (0)