Add VSCode syntax highlighting extension for Flux
Adds the vscode-flux extension with TextMate grammar covering keywords, types, literals, operators, comments, and function/struct name highlighting. Supports .flux and .flx file extensions.
This commit is contained in:
45
vscode-flux/language-configuration.json
Normal file
45
vscode-flux/language-configuration.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"comments": {
|
||||
"lineComment": "//",
|
||||
"blockComment": ["/*", "*/"]
|
||||
},
|
||||
"brackets": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"]
|
||||
],
|
||||
"autoClosingPairs": [
|
||||
{ "open": "{", "close": "}" },
|
||||
{ "open": "[", "close": "]" },
|
||||
{ "open": "(", "close": ")" },
|
||||
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
|
||||
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
|
||||
{ "open": "/*", "close": " */" }
|
||||
],
|
||||
"surroundingPairs": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["\"", "\""],
|
||||
["'", "'"]
|
||||
],
|
||||
"onEnterRules": [
|
||||
{
|
||||
"beforeText": { "pattern": "^\\s*/\\*\\*(?!/)([^*]|\\*(?!/))*$" },
|
||||
"action": { "indent": "indentOutdent", "appendText": " * " }
|
||||
},
|
||||
{
|
||||
"beforeText": { "pattern": "^\\s* \\* (?!/).*$" },
|
||||
"action": { "indent": "none", "appendText": "* " }
|
||||
},
|
||||
{
|
||||
"beforeText": { "pattern": "^\\s* \\*/$" },
|
||||
"action": { "indent": "none", "removeText": 1 }
|
||||
}
|
||||
],
|
||||
"indentationRules": {
|
||||
"increaseIndentPattern": { "pattern": "^.*\\{[^}\"']*$" },
|
||||
"decreaseIndentPattern": { "pattern": "^\\s*\\}" }
|
||||
},
|
||||
"wordPattern": { "pattern": "[a-zA-Z_][a-zA-Z0-9_]*" }
|
||||
}
|
||||
Reference in New Issue
Block a user