Skip to content

Commit a7e1b5a

Browse files
committed
format: Sort keys in *.tmLanguage.json files
1 parent 005bf8c commit a7e1b5a

File tree

68 files changed

+351
-412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+351
-412
lines changed

.prettierrc.cjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/** @type {import('prettier').Config} */
2+
module.exports = {
3+
...require('@hyperupcall/prettier-config'),
4+
overrides: [
5+
{
6+
files: '*.tmLanguage.json',
7+
options: {
8+
plugins: ['prettier-plugin-sort-json'],
9+
parser: 'json',
10+
jsonSortOrder: JSON.stringify({
11+
$schema: null,
12+
name: null,
13+
scopeName: null,
14+
uuid: null,
15+
comment: null,
16+
author: null,
17+
maxTokensPerLine: null,
18+
keyEquivalent: null,
19+
fileTypes: null,
20+
injectionSelector: null,
21+
foldingStartMarker: null,
22+
foldingStopMarker: null,
23+
'/^[^\\d+]/': 'lexical',
24+
'/^\\d+/': 'numeric',
25+
patterns: null,
26+
repository: null,
27+
}),
28+
},
29+
},
30+
],
31+
}

.prettierrc.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

language-configuration/awk-regexp.language-configuration.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,5 @@
1616
["(", ")"],
1717
["[", "]"]
1818
],
19-
"colorizedBracketPairs": [
20-
["(", ")"]
21-
]
19+
"colorizedBracketPairs": [["(", ")"]]
2220
}
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
2-
"comments": {
3-
"lineComment": "#"
4-
},
5-
"brackets": [
6-
["{", "}"],
7-
["[", "]"],
8-
["(", ")"]
9-
],
10-
"autoClosingPairs": [
11-
["{", "}"],
12-
["[", "]"],
13-
["(", ")"],
14-
["\"", "\""],
15-
["'", "'"]
16-
],
17-
"surroundingPairs": [
18-
["{", "}"],
19-
["[", "]"],
20-
["(", ")"],
21-
["\"", "\""],
22-
["'", "'"]
23-
],
24-
"indentationRules": {
25-
"increaseIndentPattern": "^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$",
26-
"decreaseIndentPattern": "^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$"
27-
}
2+
"comments": {
3+
"lineComment": "#"
4+
},
5+
"brackets": [
6+
["{", "}"],
7+
["[", "]"],
8+
["(", ")"]
9+
],
10+
"autoClosingPairs": [
11+
["{", "}"],
12+
["[", "]"],
13+
["(", ")"],
14+
["\"", "\""],
15+
["'", "'"]
16+
],
17+
"surroundingPairs": [
18+
["{", "}"],
19+
["[", "]"],
20+
["(", ")"],
21+
["\"", "\""],
22+
["'", "'"]
23+
],
24+
"indentationRules": {
25+
"increaseIndentPattern": "^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$",
26+
"decreaseIndentPattern": "^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$"
27+
}
2828
}
Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,37 @@
11
{
22
"comments": {
3-
"lineComment": "# ",
3+
"lineComment": "# "
44
},
55
"autoClosingPairs": [
66
{
77
"open": "{",
88
"close": "}",
9-
"notIn": [
10-
"string"
11-
]
9+
"notIn": ["string"]
1210
},
1311
{
1412
"open": "[",
1513
"close": "]",
16-
"notIn": [
17-
"string"
18-
]
14+
"notIn": ["string"]
1915
},
2016
{
2117
"open": "(",
2218
"close": ")",
23-
"notIn": [
24-
"string"
25-
]
19+
"notIn": ["string"]
2620
},
2721
{
2822
"open": "'",
2923
"close": "'",
30-
"notIn": [
31-
"string"
32-
]
24+
"notIn": ["string"]
3325
},
3426
{
3527
"open": "\"",
3628
"close": "\"",
37-
"notIn": [
38-
"string",
39-
"comment"
40-
]
29+
"notIn": ["string", "comment"]
4130
},
4231
{
4332
"open": "`",
4433
"close": "`",
45-
"notIn": [
46-
"string",
47-
"comment"
48-
]
34+
"notIn": ["string", "comment"]
4935
}
5036
]
5137
}

language-configuration/llvm.language-configuration.json

Lines changed: 13 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,22 @@
33
"lineComment": ";"
44
},
55
"brackets": [
6-
[
7-
"{",
8-
"}"
9-
],
10-
[
11-
"[",
12-
"]"
13-
],
14-
[
15-
"(",
16-
")"
17-
]
6+
["{", "}"],
7+
["[", "]"],
8+
["(", ")"]
189
],
1910
"autoClosingPairs": [
20-
[
21-
"{",
22-
"}"
23-
],
24-
[
25-
"[",
26-
"]"
27-
],
28-
[
29-
"(",
30-
")"
31-
],
32-
[
33-
"\"",
34-
"\""
35-
],
36-
[
37-
"'",
38-
"'"
39-
]
11+
["{", "}"],
12+
["[", "]"],
13+
["(", ")"],
14+
["\"", "\""],
15+
["'", "'"]
4016
],
4117
"surroundingPairs": [
42-
[
43-
"{",
44-
"}"
45-
],
46-
[
47-
"[",
48-
"]"
49-
],
50-
[
51-
"(",
52-
")"
53-
],
54-
[
55-
"\"",
56-
"\""
57-
],
58-
[
59-
"'",
60-
"'"
61-
]
18+
["{", "}"],
19+
["[", "]"],
20+
["(", ")"],
21+
["\"", "\""],
22+
["'", "'"]
6223
]
6324
}
Lines changed: 14 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,25 @@
11
{
22
"comments": {
33
"lineComment": "//",
4-
"blockComment": [
5-
"/*",
6-
"*/"
7-
]
4+
"blockComment": ["/*", "*/"]
85
},
96
"brackets": [
10-
[
11-
"{",
12-
"}"
13-
],
14-
[
15-
"[",
16-
"]"
17-
],
18-
[
19-
"(",
20-
")"
21-
]
7+
["{", "}"],
8+
["[", "]"],
9+
["(", ")"]
2210
],
2311
"autoClosingPairs": [
24-
[
25-
"{",
26-
"}"
27-
],
28-
[
29-
"[",
30-
"]"
31-
],
32-
[
33-
"(",
34-
")"
35-
],
36-
[
37-
"\"",
38-
"\""
39-
],
40-
[
41-
"'",
42-
"'"
43-
]
12+
["{", "}"],
13+
["[", "]"],
14+
["(", ")"],
15+
["\"", "\""],
16+
["'", "'"]
4417
],
4518
"surroundingPairs": [
46-
[
47-
"{",
48-
"}"
49-
],
50-
[
51-
"[",
52-
"]"
53-
],
54-
[
55-
"(",
56-
")"
57-
],
58-
[
59-
"\"",
60-
"\""
61-
],
62-
[
63-
"'",
64-
"'"
65-
]
19+
["{", "}"],
20+
["[", "]"],
21+
["(", ")"],
22+
["\"", "\""],
23+
["'", "'"]
6624
]
6725
}
Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,14 @@
11
{
22
"comments": {},
3-
"brackets": [
4-
[
5-
"(",
6-
")"
7-
]
8-
],
3+
"brackets": [["(", ")"]],
94
"autoClosingPairs": [
10-
[
11-
"(",
12-
")"
13-
],
14-
[
15-
"\"",
16-
"\""
17-
],
18-
[
19-
"'",
20-
"'"
21-
]
5+
["(", ")"],
6+
["\"", "\""],
7+
["'", "'"]
228
],
239
"surroundingPairs": [
24-
[
25-
"(",
26-
")"
27-
],
28-
[
29-
"\"",
30-
"\""
31-
],
32-
[
33-
"'",
34-
"'"
35-
]
10+
["(", ")"],
11+
["\"", "\""],
12+
["'", "'"]
3613
]
3714
}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@
2323
"engines": {
2424
"vscode": "^1.54.0"
2525
},
26+
"scripts": {
27+
"format": "prettier --write ."
28+
},
2629
"devDependencies": {
2730
"@hyperupcall/prettier-config": "^0.7.0",
2831
"prettier": "^3.0.3",
29-
"prettier-plugin-pkg": "^0.18.0"
32+
"prettier-plugin-pkg": "^0.18.0",
33+
"prettier-plugin-sort-json": "^3.1.0"
3034
},
3135
"icon": "assets/icon.png",
3236
"contributes": {

0 commit comments

Comments
 (0)