Przeglądaj źródła

[Changed] Added ability to toggle Block comments in VSCode

philormand 4 lat temu
rodzic
commit
5ab620d69d

+ 3 - 2
syntax/VSCode/qsrc/language-configuration.json

@@ -1,6 +1,7 @@
 {
     "comments": {
-      "lineComment": "!"
+        "lineComment": "!",
+        "blockComment": ["!{", "}"]
     },
     // symbols used as brackets
     "brackets": [
@@ -24,4 +25,4 @@
         ["\"", "\""],
         ["'", "'"]
     ]
-}
+}

+ 9 - 4
syntax/VSCode/qsrc/syntaxes/QSP.tmLanguage.json

@@ -49,19 +49,24 @@
 			"name": "support.function.qsp",
 			"match": "(?i:(,|\\[|\\]|\\(|\\)|\\{|\\}|&|\\+|=|-|(<|>)=?|=?(<|>)))"
 		},
+		{
+			"name": "comment.block.doubleexclamation.qsp",
+			"begin": "!!{",
+			"end": "}$"
+		},
 		{
 			"name": "comment.block.exclamation.qsp",
 			"begin": "!{",
 			"end": "}$"
 		},
 		{
-			"name": "comment.line.exclamation.qsp",
-			"begin": "^!",
+			"name": "comment.line.doubleexclamation.qsp",
+			"begin": "!!",
 			"end": "$"
 		},
 		{
-			"name": "comment.line.doubleexclamation.qsp",
-			"begin": "!!",
+			"name": "comment.line.exclamation.qsp",
+			"begin": "^!",
 			"end": "$"
 		},
 		{