mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +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": [
|
||||
".rast"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "rust",
|
||||
"extensions": [
|
||||
".rs"
|
||||
],
|
||||
"aliases": [
|
||||
"Rust",
|
||||
"rs"
|
||||
],
|
||||
"configuration": "language-configuration.json"
|
||||
}
|
||||
],
|
||||
"grammars": [
|
||||
|
|
Loading…
Reference in a new issue