From 612be092826ad6654fd7f8a337c49a39754e9293 Mon Sep 17 00:00:00 2001 From: Dusty Pomerleau Date: Sat, 12 Dec 2020 11:31:00 +1100 Subject: add a language configuration for VS Code --- editors/code/language-configuration.json | 38 ++++++++++++++++++++++++++++++++ editors/code/package.json | 11 +++++++++ 2 files changed, 49 insertions(+) create mode 100644 editors/code/language-configuration.json diff --git a/editors/code/language-configuration.json b/editors/code/language-configuration.json new file mode 100644 index 000000000..b20e0d978 --- /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 ca5f2ebc8..160a62e46 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": [ -- cgit v1.2.3