Skip to content

Commit b5ba419

Browse files
authored
Merge pull request #761 from isc-bsaviano/fix-541
Add auto-commenting of new lines following existing ObjectScript comments
2 parents 19feaf1 + 8280cee commit b5ba419

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

src/languageConfiguration.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,34 @@ export function getLanguageConfiguration(lang: string): LanguageConfiguration {
1919
? [
2020
{
2121
beforeText: /^\/\/\//,
22-
afterText: /.*/,
2322
action: { indentAction: IndentAction.None, appendText: "/// " },
2423
},
2524
]
26-
: [],
25+
: [
26+
{
27+
beforeText: /^\s\/\/\//,
28+
action: { indentAction: IndentAction.None, appendText: "/// " },
29+
},
30+
{
31+
beforeText: /^\s\/\/[^/]?/,
32+
action: { indentAction: IndentAction.None, appendText: "// " },
33+
},
34+
{
35+
beforeText: /^\s;;/,
36+
action: { indentAction: IndentAction.None, appendText: ";; " },
37+
},
38+
{
39+
beforeText: /^\s;[^;]?/,
40+
action: { indentAction: IndentAction.None, appendText: "; " },
41+
},
42+
{
43+
beforeText: /^\s#;/,
44+
action: { indentAction: IndentAction.None, appendText: "#; " },
45+
},
46+
{
47+
beforeText: /^\s##;/,
48+
action: { indentAction: IndentAction.None, appendText: "##; " },
49+
},
50+
],
2751
};
2852
}

0 commit comments

Comments
 (0)