-
Notifications
You must be signed in to change notification settings - Fork 93
/
ansible-language-configuration.json
52 lines (52 loc) · 1.69 KB
/
ansible-language-configuration.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Imported from:
// 1. https://github.com/samuelcolvin/jinjahtml-vscode/blob/b8fe444cbd838afb4962bb2446e67c85e0443675/language-configuration.json
// 2. https://github.com/redhat-developer/vscode-yaml/blob/main/language-configuration.json
{
"comments": {
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
"lineComment": "#"
},
// symbols used as brackets
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
// symbols that are auto closed when typing
"autoClosingPairs": [
["[", "]"],
["{", "}"],
["(", ")"],
["\"", "\""],
["'", "'"],
["{{ ", " "], // curly braces are already auto-closed, this adds space at the end if one is added at the beginning
["{#", "#}"],
["{%", "%}"]
],
// added `'` and `"` -> in Ansible this pattern is extremely common:
// `"{{ jinja_expression }}"`
// with default config, `"` gets auto-closed and with cursor in the middle (`"|"`), brace auto-closing would not work
"autoCloseBefore": "'\";:.,=}])> \n\t",
// symbols that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"],
["`", "`"],
[" ", " "] // for spacing Jinja (and other) expressions; this setting might be a bit controversial ;)
],
"folding": {
"offSide": true,
"markers": {
"start": "^\\s*#\\s*region\\b",
"end": "^\\s*#\\s*endregion\\b"
}
},
"indentationRules": {
"increaseIndentPattern": "^\\s*.*(:|-) ?(&\\w+)?(\\{[^}\"']*|\\([^)\"']*)?$",
"decreaseIndentPattern": "^\\s+\\}$"
},
"wordPattern": "(^.?[^\\s]+)+|([^\\s\n={[][\\w\\-\\./$%&*:\"']+)"
}