diff --git a/editors/code/language-configuration.json b/editors/code/language-configuration.json new file mode 100644 index 0000000000..b20e0d978e --- /dev/null +++ b/editors/code/language-configuration.json @@ -0,0 +1,38 @@ +{ + "comments": { + "lineComment": "//", + "blockComment": [ "/*", "*/" ] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["<", ">"] + ], + "autoClosingPairs": [ + { "open": "{", "close": "}" }, + { "open": "[", "close": "]" }, + { "open": "(", "close": ")" }, + { "open": "\"", "close": "\"", "notIn": ["string"] }, + { "open": "/*", "close": " */" } + ], + "autoCloseBefore": ";:.,=}])> \n\t", + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["<", ">"], + ["\"", "\""], + ["'", "'"] + ], + "indentationRules": { + "increaseIndentPattern": "^.*\\{[^}\"']*$|^.*\\([^\\)\"']*$", + "decreaseIndentPattern": "^\\s*(\\s*\\/[*].*[*]\\/\\s*)*[})]" + }, + "folding": { + "markers": { + "start": "^\\s*//\\s*#?region\\b", + "end": "^\\s*//\\s*#?endregion\\b" + } + } +} diff --git a/editors/code/package.json b/editors/code/package.json index ca5f2ebc8d..160a62e467 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -734,6 +734,17 @@ "extensions": [ ".rast" ] + }, + { + "id": "rust", + "extensions": [ + ".rs" + ], + "aliases": [ + "Rust", + "rs" + ], + "configuration": "language-configuration.json" } ], "grammars": [