aero-vscode 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscodeignore +13 -0
- package/LICENSE +21 -0
- package/README.md +69 -0
- package/aero-vscode-0.0.1.vsix +0 -0
- package/dist/extension.js +19 -0
- package/images/logo.png +0 -0
- package/package.json +98 -0
- package/src/__tests__/analyzer.test.ts +202 -0
- package/src/__tests__/diagnostics.test.ts +964 -0
- package/src/__tests__/providers.test.ts +292 -0
- package/src/__tests__/utils.test.ts +120 -0
- package/src/analyzer.ts +914 -0
- package/src/completionProvider.ts +328 -0
- package/src/constants.ts +35 -0
- package/src/definitionProvider.ts +371 -0
- package/src/diagnostics.ts +732 -0
- package/src/extension.ts +74 -0
- package/src/hoverProvider.ts +134 -0
- package/src/pathResolver.ts +171 -0
- package/src/positionAt.ts +509 -0
- package/src/scope.ts +116 -0
- package/src/utils.ts +56 -0
- package/syntaxes/aero-attributes.json +54 -0
- package/syntaxes/aero-expressions.json +26 -0
- package/syntaxes/aero-globals.json +22 -0
- package/tsconfig.json +19 -0
- package/vitest.config.ts +7 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scopeName": "aero.attributes.injection",
|
|
3
|
+
"injectionSelector": "L:meta.tag -comment",
|
|
4
|
+
"patterns": [
|
|
5
|
+
{ "include": "#aero-script-type-attributes" },
|
|
6
|
+
{ "include": "#aero-control-flow-attributes" },
|
|
7
|
+
{ "include": "#aero-props-attribute" }
|
|
8
|
+
],
|
|
9
|
+
"repository": {
|
|
10
|
+
"aero-script-type-attributes": {
|
|
11
|
+
"comment": "Highlight on:build and on:client as special script type attributes",
|
|
12
|
+
"match": "\\b(on:(build|client))\\b",
|
|
13
|
+
"captures": {
|
|
14
|
+
"1": { "name": "entity.other.attribute-name.html" }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"aero-control-flow-attributes": {
|
|
18
|
+
"comment": "Highlight Aero data-* control flow attributes while leaving shorthand attrs to default HTML tokenization",
|
|
19
|
+
"patterns": [
|
|
20
|
+
{
|
|
21
|
+
"match": "\\b(data-each)(?=[\\s=/>])",
|
|
22
|
+
"captures": {
|
|
23
|
+
"1": { "name": "entity.other.attribute-name.html" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"match": "\\b(data-if)(?=[\\s=/>])",
|
|
28
|
+
"captures": {
|
|
29
|
+
"1": { "name": "entity.other.attribute-name.html" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"match": "\\b(data-else-if)(?=[\\s=/>])",
|
|
34
|
+
"captures": {
|
|
35
|
+
"1": { "name": "entity.other.attribute-name.html" }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"match": "\\b(data-else)(?=[\\s/>])",
|
|
40
|
+
"captures": {
|
|
41
|
+
"1": { "name": "entity.other.attribute-name.html" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"aero-props-attribute": {
|
|
47
|
+
"comment": "Highlight data-props as a special props attribute",
|
|
48
|
+
"match": "\\b(data-props)\\b",
|
|
49
|
+
"captures": {
|
|
50
|
+
"1": { "name": "entity.other.attribute-name.html" }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scopeName": "aero.expressions.injection",
|
|
3
|
+
"injectionSelector": "L:text.html.basic -source.css -source.js -comment.block.html, L:text.html.derivative -source.css -source.js -comment.block.html, L:string.quoted.double.html -source.css -source.js, L:string.quoted.single.html -source.css -source.js",
|
|
4
|
+
"patterns": [
|
|
5
|
+
{
|
|
6
|
+
"begin": "\\{",
|
|
7
|
+
"end": "\\}",
|
|
8
|
+
"beginCaptures": {
|
|
9
|
+
"0": { "name": "punctuation.section.embedded.begin.aero" }
|
|
10
|
+
},
|
|
11
|
+
"endCaptures": {
|
|
12
|
+
"0": { "name": "punctuation.section.embedded.end.aero" }
|
|
13
|
+
},
|
|
14
|
+
"contentName": "meta.embedded.expression.aero source.ts",
|
|
15
|
+
"patterns": [
|
|
16
|
+
{
|
|
17
|
+
"comment": "Handle object literals that start with { so nested braces are parsed correctly",
|
|
18
|
+
"begin": "\\G\\s*(?=\\{)",
|
|
19
|
+
"end": "(?<=\\})",
|
|
20
|
+
"patterns": [{ "include": "source.ts#object-literal" }]
|
|
21
|
+
},
|
|
22
|
+
{ "include": "source.ts" }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scopeName": "aero.globals.injection",
|
|
3
|
+
"injectionSelector": "L:source.js -comment -source.css.embedded.html, L:source.ts -comment -source.css.embedded.html",
|
|
4
|
+
"patterns": [
|
|
5
|
+
{
|
|
6
|
+
"match": "\\bAero\\b",
|
|
7
|
+
"name": "entity.name.type.aero"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"match": "\\b(site)(\\.)([a-zA-Z_$][a-zA-Z0-9_$]*)\\b",
|
|
11
|
+
"captures": {
|
|
12
|
+
"1": { "name": "entity.name.type.aero" },
|
|
13
|
+
"2": { "name": "punctuation.accessor.js" },
|
|
14
|
+
"3": { "name": "support.variable.property.aero" }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"match": "\\bprops\\b",
|
|
19
|
+
"name": "support.variable.aero"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2020"],
|
|
6
|
+
"outDir": "dist",
|
|
7
|
+
"rootDir": "src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"declaration": false,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"types": ["node", "vscode"]
|
|
16
|
+
},
|
|
17
|
+
"include": ["src/**/*.ts"],
|
|
18
|
+
"exclude": ["node_modules", "dist"]
|
|
19
|
+
}
|