diff --git a/lang-configs/d.json b/lang-configs/d.json index 4984d85..0b2fc93 100644 --- a/lang-configs/d.json +++ b/lang-configs/d.json @@ -86,5 +86,33 @@ "start": "^\\s*//\\s*dfmt\\s*off", "end": "^\\s*//\\s*dfmt\\s*on" } - } -} \ No newline at end of file + }, + "onEnterRules": [ + { + "beforeText": "^\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$", + "afterText": "^\\s*\\*\/$", + "action": { "indent": "indentOutdent", "appendText": " * " } + }, + { + "beforeText": "^\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$", + "action": { "indent": "none", "appendText": " * " } + }, + { + "beforeText": "^(\\t|(\\ \\ ))*\\ \\*(\\ ([^\\*]|\\*(?!\\/))*)?$", + "action": { "indent": "none", "appendText": "* " } + }, + { + "beforeText": "^\\s*\\/\\+\\+(?!\\/)([^\\+]|\\+(?!\\/))*$", + "afterText": "^\\s+\\+\/$", + "action": { "indent": "indentOutdent", "appendText": " + " } + }, + { + "beforeText": "^\\s*\\/\\+\\+(?!\\/)([^\\+]|\\+(?!\\/))*$", + "action": { "indent": "none", "appendText": " + " } + }, + { + "beforeText": "^(\\t|(\\ \\ ))*\\ \\+(\\ ([^\\+]|\\+(?!\\/))*)?$", + "action": { "indent": "none", "appendText": "+ " } + }, + ] +}