diff --git a/src/languageConfiguration.ts b/src/languageConfiguration.ts index 0ed74d59..42a4c801 100644 --- a/src/languageConfiguration.ts +++ b/src/languageConfiguration.ts @@ -19,10 +19,34 @@ export function getLanguageConfiguration(lang: string): LanguageConfiguration { ? [ { beforeText: /^\/\/\//, - afterText: /.*/, action: { indentAction: IndentAction.None, appendText: "/// " }, }, ] - : [], + : [ + { + beforeText: /^\s\/\/\//, + action: { indentAction: IndentAction.None, appendText: "/// " }, + }, + { + beforeText: /^\s\/\/[^/]?/, + action: { indentAction: IndentAction.None, appendText: "// " }, + }, + { + beforeText: /^\s;;/, + action: { indentAction: IndentAction.None, appendText: ";; " }, + }, + { + beforeText: /^\s;[^;]?/, + action: { indentAction: IndentAction.None, appendText: "; " }, + }, + { + beforeText: /^\s#;/, + action: { indentAction: IndentAction.None, appendText: "#; " }, + }, + { + beforeText: /^\s##;/, + action: { indentAction: IndentAction.None, appendText: "##; " }, + }, + ], }; }