mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
add a language configuration for VS Code
This commit is contained in:
parent
a15d19619e
commit
612be09282
2 changed files with 49 additions and 0 deletions
38
editors/code/language-configuration.json
Normal file
38
editors/code/language-configuration.json
Normal file
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -734,6 +734,17 @@
|
||||||
"extensions": [
|
"extensions": [
|
||||||
".rast"
|
".rast"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "rust",
|
||||||
|
"extensions": [
|
||||||
|
".rs"
|
||||||
|
],
|
||||||
|
"aliases": [
|
||||||
|
"Rust",
|
||||||
|
"rs"
|
||||||
|
],
|
||||||
|
"configuration": "language-configuration.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"grammars": [
|
"grammars": [
|
||||||
|
|
Loading…
Reference in a new issue