From ae34c142eb7ca258cdaba72f5e3751b04efb9aae Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 2 Oct 2024 11:05:47 +0200 Subject: [PATCH] Continue single-line comments after pressing enter Closes issue #19 --- language-configuration.json | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/language-configuration.json b/language-configuration.json index 9ac8681..6579f86 100644 --- a/language-configuration.json +++ b/language-configuration.json @@ -11,7 +11,7 @@ "autoClosingPairs": [ ["{", "}"], ["[", "]"], - ["(", ")"], + ["(", ")"] ], "surroundingPairs": [ ["{", "}"], @@ -20,7 +20,23 @@ ["<{", "}>"] ], "folding": { - "offSide": false, + "offSide": false }, - "wordPattern": "([a-zA-Z][a-zA-Z0-9_]*)" + "wordPattern": "([a-zA-Z][a-zA-Z0-9_]*)", + "onEnterRules": [ + { + "beforeText": "^\\s*//[^/].*$", + "action": { + "appendText": "// ", + "indent": "none" + } + }, + { + "beforeText": "^\\s*///.*$", + "action": { + "appendText": "/// ", + "indent": "none" + } + } + ] }