Add rjson syntax highlighter to VS Code extension
MODIFY
public-packages/vscode-extension/package.json
public-packages/vscode-extension/package.json
"onLanguage:javascriptreact",
"onLanguage:typescript",
"onLanguage:typescriptreact",
- "onLanguage:json"
+ "onLanguage:json",
+ "onLanguage:rjson"
],
+ "contributes": {
+ "languages": [
+ {
+ "id": "rjson",
+ "aliases": [
+ "Rome JSON",
+ "RJSON"
+ ],
+ "extensions": [
+ ".rjson"
+ ],
+ "mimetypes": [
+ "application/rjson"
+ ],
+ "configuration": "./syntaxes/rjson-language-configuration.json"
+ }
+ ],
+ "grammars": [
+ {
+ "language": "rjson",
+ "scopeName": "source.json.rome",
+ "path": "./syntaxes/RJSON.tmLanguage.json"
+ }
+ ]
+ },
"files": [
"/icon.png",
- "/README.md"
+ "/README.md",
+ "/syntaxes"
],
"main": "index.ts",
"engines": {

ADD
public-packages/vscode-extension/syntaxes/rjson-language-configuration.json
+{
+ "comments": {
+ "lineComment": "//",
+ "blockComment": [
+ "/*",
+ "*/"
+ ]
+ },
+ "brackets": [
+ [
+ "{",
+ "}"
+ ],
+ [
+ "[",
+ "]"
+ ]
+ ],
+ "autoClosingPairs": [
+ {
+ "open": "{",
+ "close": "}",
+ "notIn": [
+ "string"
+ ]
+ },
+ {
+ "open": "[",
+ "close": "]",
+ "notIn": [
+ "string"
+ ]
+ },
+ {
+ "open": "(",
+ "close": ")",
+ "notIn": [
+ "string"
+ ]
+ },
+ {
+ "open": "'",
+ "close": "'",
+ "notIn": [
+ "string"
+ ]
+ },
+ {
+ "open": "\"",
+ "close": "\"",
+ "notIn": [
+ "string",
+ "comment"
+ ]
+ },
+ {
+ "open": "`",
+ "close": "`",
+ "notIn": [
+ "string",
+ "comment"
+ ]
+ }
+ ]
+}

Add rjson syntax highlighter to VS Code extension (#1007)