Skip to content

Commit

Permalink
Auto close and indent comments (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronz0 authored Sep 11, 2023
1 parent f549132 commit 4d9b2fb
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions rescript.configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@
[
"`",
"`"
]
],
{
"open": "/*",
"close": " */",
"notIn": ["string"]
}
],
"surroundingPairs": [
[
Expand Down Expand Up @@ -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 }
}
]
}

0 comments on commit 4d9b2fb

Please sign in to comment.