diff --git a/rescript.configuration.json b/rescript.configuration.json index 1ab19aef3..1cfd33d59 100644 --- a/rescript.configuration.json +++ b/rescript.configuration.json @@ -40,7 +40,12 @@ [ "`", "`" - ] + ], + { + "open": "/*", + "close": " */", + "notIn": ["string"] + } ], "surroundingPairs": [ [ @@ -69,5 +74,20 @@ "start": "^\\s*//\\s*#?region\\b", "end": "^\\s*//\\s*#?endregion\\b" } - } + }, + "onEnterRules": [ + { + "beforeText": { "pattern": "^\\s*/\\*(?!/)([^\\*]|\\*(?!/))*$" }, + "afterText": { "pattern": "^\\s*\\*/$" }, + "action": { "indent": "indentOutdent", "appendText": " "} + }, + { + "beforeText": { "pattern": "^\\s*/\\*(?!/)([^\\*]|\\*(?!/))*$" }, + "action": { "indent": "none", "appendText": " "} + }, + { + "beforeText": { "pattern": "^(\\t|[ ])*[ ]\\*/\\s*$" }, + "action": { "indent": "none", "removeText": 1 } + } + ] }