astro-vscode 2.15.1 → 2.15.3

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.
Files changed (65) hide show
  1. package/.turbo/turbo-build.log +12 -0
  2. package/.vscodeignore +10 -0
  3. package/CHANGELOG.md +1411 -0
  4. package/dist/node/client.js +1 -1
  5. package/dist/node/server.js +272 -272
  6. package/package.json +3 -9
  7. package/scripts/build-grammar.mjs +45 -0
  8. package/scripts/build.mjs +79 -0
  9. package/scripts/shared.mjs +29 -0
  10. package/src/client.ts +151 -0
  11. package/test/grammar/README.md +5 -0
  12. package/test/grammar/dummy/css.tmLanguage-dummy.json +4 -0
  13. package/test/grammar/dummy/html.tmLanguage-dummy.json +4 -0
  14. package/test/grammar/dummy/js.tmLanguage-dummy.json +4 -0
  15. package/test/grammar/dummy/json.tmLanguage-dummy.json +4 -0
  16. package/test/grammar/dummy/less.tsLanguage-dummy.json +4 -0
  17. package/test/grammar/dummy/postcss.tmLanguage-dummy.json +4 -0
  18. package/test/grammar/dummy/sass.tmLanguage-dummy.json +4 -0
  19. package/test/grammar/dummy/scss.tsLanguage-dummy.json +4 -0
  20. package/test/grammar/dummy/stylus.tmLanguage-dummy.json +4 -0
  21. package/test/grammar/dummy/ts.tmLanguage-dummy.json +4 -0
  22. package/test/grammar/dummy/tsx.tmLanguage-dummy.json +4 -0
  23. package/test/grammar/dummy/unknown.tmLanguage-dummy.json +4 -0
  24. package/test/grammar/fixtures/attributes.astro +14 -0
  25. package/test/grammar/fixtures/attributes.astro.snap +102 -0
  26. package/test/grammar/fixtures/components/component.astro +3 -0
  27. package/test/grammar/fixtures/components/component.astro.snap +17 -0
  28. package/test/grammar/fixtures/constant-entities.astro +7 -0
  29. package/test/grammar/fixtures/constant-entities.astro.snap +80 -0
  30. package/test/grammar/fixtures/raw/israw.astro +15 -0
  31. package/test/grammar/fixtures/raw/israw.astro.snap +68 -0
  32. package/test/grammar/fixtures/script/events.astro +3 -0
  33. package/test/grammar/fixtures/script/events.astro.snap +30 -0
  34. package/test/grammar/fixtures/script/israw.astro +3 -0
  35. package/test/grammar/fixtures/script/israw.astro.snap +13 -0
  36. package/test/grammar/fixtures/script/json.astro +14 -0
  37. package/test/grammar/fixtures/script/json.astro.snap +39 -0
  38. package/test/grammar/fixtures/script/jstypes.astro +15 -0
  39. package/test/grammar/fixtures/script/jstypes.astro.snap +68 -0
  40. package/test/grammar/fixtures/script/module.astro +3 -0
  41. package/test/grammar/fixtures/script/module.astro.snap +17 -0
  42. package/test/grammar/fixtures/script/script.astro +3 -0
  43. package/test/grammar/fixtures/script/script.astro.snap +11 -0
  44. package/test/grammar/fixtures/script/unknowntype.astro +3 -0
  45. package/test/grammar/fixtures/script/unknowntype.astro.snap +17 -0
  46. package/test/grammar/fixtures/style/israw.astro +5 -0
  47. package/test/grammar/fixtures/style/israw.astro.snap +17 -0
  48. package/test/grammar/fixtures/style/less.astro +9 -0
  49. package/test/grammar/fixtures/style/less.astro.snap +28 -0
  50. package/test/grammar/fixtures/style/sass.astro +8 -0
  51. package/test/grammar/fixtures/style/sass.astro.snap +26 -0
  52. package/test/grammar/fixtures/style/scss.astro +9 -0
  53. package/test/grammar/fixtures/style/scss.astro.snap +28 -0
  54. package/test/grammar/fixtures/style/style.astro +3 -0
  55. package/test/grammar/fixtures/style/style.astro.snap +11 -0
  56. package/test/grammar/fixtures/style/stylus.astro +9 -0
  57. package/test/grammar/fixtures/style/stylus.astro.snap +38 -0
  58. package/test/grammar/fixtures/text.astro +15 -0
  59. package/test/grammar/fixtures/text.astro.snap +58 -0
  60. package/test/grammar/test.mjs +59 -0
  61. package/test/runTest.js +27 -0
  62. package/test/suite/extension.test.js +15 -0
  63. package/test/suite/index.js +40 -0
  64. package/test/tsconfig.json +14 -0
  65. package/tsconfig.json +9 -0
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "color": "#17191E",
25
25
  "theme": "dark"
26
26
  },
27
- "version": "2.15.1",
27
+ "version": "2.15.3",
28
28
  "author": "withastro",
29
29
  "license": "MIT",
30
30
  "publisher": "astro-build",
@@ -36,12 +36,6 @@
36
36
  "workspaceContains:astro.config.*"
37
37
  ],
38
38
  "main": "./dist/node/client.js",
39
- "files": [
40
- "dist/",
41
- "languages/",
42
- "syntaxes/",
43
- "assets/"
44
- ],
45
39
  "repository": {
46
40
  "type": "git",
47
41
  "url": "https://github.com/withastro/language-tools.git",
@@ -236,8 +230,8 @@
236
230
  ]
237
231
  },
238
232
  "devDependencies": {
239
- "@astrojs/language-server": "^2.15.0",
240
- "@astrojs/ts-plugin": "^1.10.2",
233
+ "@astrojs/language-server": "^2.15.3",
234
+ "@astrojs/ts-plugin": "^1.10.3",
241
235
  "@types/glob": "^8.1.0",
242
236
  "@types/mocha": "^10.0.1",
243
237
  "@types/node": "^18.17.8",
@@ -0,0 +1,45 @@
1
+ // @ts-check
2
+ import fs from 'node:fs';
3
+ import { fileURLToPath } from 'node:url';
4
+ import yaml from 'js-yaml';
5
+ import { dim, green } from 'kleur/colors';
6
+
7
+ const dt = new Intl.DateTimeFormat('en-us', {
8
+ hour: '2-digit',
9
+ minute: '2-digit',
10
+ });
11
+
12
+ // Rebuild grammar when any yaml in the syntaxes directory changes
13
+ const syntaxesDir = new URL('../syntaxes/', import.meta.url);
14
+ const isWatch = process.argv.includes('--watch');
15
+
16
+ if (isWatch) {
17
+ console.info('Watching for changes in the syntaxes directory...');
18
+ }
19
+
20
+ // Absolute paths to the grammars
21
+ const grammarFiles = fs
22
+ .readdirSync(syntaxesDir)
23
+ .filter((file) => file.endsWith('.src.yaml'))
24
+ .map((path) => new URL(path, syntaxesDir));
25
+ for (const grammarFile of grammarFiles) {
26
+ if (isWatch) {
27
+ fs.watch(grammarFile, () => {
28
+ buildGrammar(grammarFile);
29
+ });
30
+ } else {
31
+ buildGrammar(grammarFile);
32
+ }
33
+ }
34
+
35
+ /**
36
+ * @param {URL} grammarFile
37
+ */
38
+ function buildGrammar(grammarFile) {
39
+ const grammar = yaml.load(fs.readFileSync(grammarFile, 'utf8'));
40
+ const finalPath = fileURLToPath(grammarFile).replace('.src.yaml', '.json');
41
+ fs.writeFileSync(finalPath, JSON.stringify(grammar, null, 2));
42
+
43
+ const date = dt.format(new Date());
44
+ console.info(dim(`[${date}] `) + green(`✔ updated ${finalPath}`));
45
+ }
@@ -0,0 +1,79 @@
1
+ // @ts-check
2
+ import fs from 'node:fs';
3
+ import { createRequire } from 'node:module';
4
+ import esbuild from 'esbuild';
5
+ import { copy } from 'esbuild-plugin-copy';
6
+ import { rebuildPlugin } from './shared.mjs';
7
+
8
+ const require = createRequire(import.meta.url);
9
+
10
+ export default async function build() {
11
+ const isDev = process.argv.includes('--watch');
12
+ const metaFile = process.argv.includes('--metafile');
13
+
14
+ /**
15
+ * @satisfies {import('esbuild').BuildOptions}
16
+ */
17
+ const config = {
18
+ entryPoints: {
19
+ 'dist/node/client': './src/client.ts',
20
+ 'dist/node/server': './node_modules/@astrojs/language-server/bin/nodeServer.js',
21
+ // We need to generate this inside node_modules so VS Code can resolve it
22
+ 'node_modules/astro-ts-plugin-bundle/index':
23
+ './node_modules/@astrojs/ts-plugin/dist/index.js',
24
+ },
25
+ bundle: true,
26
+ metafile: metaFile,
27
+ sourcemap: isDev,
28
+ outdir: '.',
29
+ external: ['vscode', '@astrojs/compiler', 'prettier', 'prettier-plugin-astro'],
30
+ format: 'cjs',
31
+ platform: 'node',
32
+ tsconfig: './tsconfig.json',
33
+ define: { 'process.env.NODE_ENV': '"production"' },
34
+ minify: process.argv.includes('--minify'),
35
+ plugins: [
36
+ copy({
37
+ resolveFrom: 'cwd',
38
+ assets: {
39
+ from: ['../language-server/types/**/*.d.ts'],
40
+ to: ['./dist/types'],
41
+ watch: isDev,
42
+ },
43
+ }),
44
+ {
45
+ name: 'umd2esm',
46
+ setup(pluginBuild) {
47
+ pluginBuild.onResolve(
48
+ { filter: /^(vscode-.*-languageservice|jsonc-parser)/ },
49
+ (buildArgs) => {
50
+ const pathUmdMay = require.resolve(buildArgs.path, { paths: [buildArgs.resolveDir] });
51
+ // Call twice the replace is to solve the problem of the path in Windows
52
+ const pathEsm = pathUmdMay.replace('/umd/', '/esm/').replace('\\umd\\', '\\esm\\');
53
+ return { path: pathEsm };
54
+ },
55
+ );
56
+ },
57
+ },
58
+ ],
59
+ };
60
+
61
+ if (!isDev) {
62
+ const result = await esbuild.build(config);
63
+ if (metaFile) fs.writeFileSync('meta.json', JSON.stringify(result.metafile));
64
+ return;
65
+ }
66
+
67
+ const builder = await esbuild.context({
68
+ ...config,
69
+ plugins: [rebuildPlugin, ...(config.plugins ?? [])],
70
+ });
71
+
72
+ await builder.watch();
73
+
74
+ process.on('beforeExit', () => {
75
+ builder.dispose && builder.dispose();
76
+ });
77
+ }
78
+
79
+ build();
@@ -0,0 +1,29 @@
1
+ // @ts-check
2
+ import { dim, green, red, yellow } from 'kleur/colors';
3
+
4
+ const dt = new Intl.DateTimeFormat('en-us', {
5
+ hour: '2-digit',
6
+ minute: '2-digit',
7
+ });
8
+
9
+ /**
10
+ * @type {import('esbuild').Plugin}
11
+ */
12
+ export const rebuildPlugin = {
13
+ name: 'astro:rebuild',
14
+ setup(build) {
15
+ build.onEnd(async (result) => {
16
+ const date = dt.format(new Date());
17
+ if (result && result.errors.length) {
18
+ console.error(dim(`[${date}] `) + red(result.errors.map((error) => error.text).join('\n')));
19
+ } else {
20
+ if (result.warnings.length) {
21
+ console.info(
22
+ dim(`[${date}] `) + yellow('⚠ updated with warnings:\n' + result.warnings.join('\n')),
23
+ );
24
+ }
25
+ console.info(dim(`[${date}] `) + green('✔ updated'));
26
+ }
27
+ });
28
+ },
29
+ };
package/src/client.ts ADDED
@@ -0,0 +1,151 @@
1
+ import * as path from 'node:path';
2
+ import * as protocol from '@volar/language-server/protocol';
3
+ import type { LabsInfo } from '@volar/vscode';
4
+ import {
5
+ activateAutoInsertion,
6
+ activateFindFileReferences,
7
+ activateReloadProjects,
8
+ activateTsConfigStatusItem,
9
+ activateTsVersionStatusItem,
10
+ createLabsInfo,
11
+ getTsdk,
12
+ } from '@volar/vscode';
13
+ import * as vscode from 'vscode';
14
+ import * as lsp from 'vscode-languageclient/node';
15
+
16
+ let client: lsp.BaseLanguageClient;
17
+
18
+ type InitOptions = {
19
+ typescript: {
20
+ tsdk: string;
21
+ };
22
+ } & Record<string, unknown>;
23
+
24
+ export async function activate(context: vscode.ExtensionContext): Promise<LabsInfo> {
25
+ const runtimeConfig = vscode.workspace.getConfiguration('astro.language-server');
26
+
27
+ const { workspaceFolders } = vscode.workspace;
28
+ const rootPath = workspaceFolders?.[0].uri.fsPath;
29
+
30
+ let lsPath = await getConfiguredServerPath(context.workspaceState);
31
+ if (typeof lsPath === 'string' && lsPath.trim() !== '' && typeof rootPath === 'string') {
32
+ lsPath = path.isAbsolute(lsPath) ? lsPath : path.join(rootPath, lsPath);
33
+ console.info(`Using language server at ${lsPath}`);
34
+ } else {
35
+ lsPath = undefined;
36
+ }
37
+ const serverModule = lsPath
38
+ ? require.resolve(lsPath)
39
+ : vscode.Uri.joinPath(context.extensionUri, 'dist/node/server.js').fsPath;
40
+
41
+ const runOptions = { execArgv: [] };
42
+ const debugOptions = {
43
+ execArgv: ['--nolazy', '--inspect=' + Math.floor(Math.random() * 20000 + 10000)],
44
+ };
45
+
46
+ const serverOptions: lsp.ServerOptions = {
47
+ run: {
48
+ module: serverModule,
49
+ transport: lsp.TransportKind.ipc,
50
+ options: runOptions,
51
+ },
52
+ debug: {
53
+ module: serverModule,
54
+ transport: lsp.TransportKind.ipc,
55
+ options: debugOptions,
56
+ },
57
+ };
58
+
59
+ const serverRuntime = runtimeConfig.get<string>('runtime');
60
+ if (serverRuntime) {
61
+ serverOptions.run.runtime = serverRuntime;
62
+ serverOptions.debug.runtime = serverRuntime;
63
+ console.info(`Using ${serverRuntime} as runtime`);
64
+ }
65
+
66
+ const hasContentIntellisense = vscode.workspace
67
+ .getConfiguration('astro')
68
+ .get('content-intellisense');
69
+ const initializationOptions = {
70
+ typescript: {
71
+ tsdk: (await getTsdk(context))!.tsdk,
72
+ },
73
+ contentIntellisense: hasContentIntellisense,
74
+ } satisfies InitOptions;
75
+
76
+ const clientOptions = {
77
+ documentSelector: [
78
+ { language: 'astro' },
79
+ ...(hasContentIntellisense
80
+ ? [{ language: 'markdown' }, { language: 'mdx' }, { language: 'markdoc' }]
81
+ : []),
82
+ ],
83
+ initializationOptions,
84
+ } satisfies lsp.LanguageClientOptions;
85
+ client = new lsp.LanguageClient('astro', 'Astro Language Server', serverOptions, clientOptions);
86
+ await client.start();
87
+
88
+ // support for auto close tag
89
+ activateAutoInsertion('astro', client);
90
+ activateFindFileReferences('astro.findFileReferences', client);
91
+ activateReloadProjects('astro.reloadProjects', client);
92
+ activateTsConfigStatusItem('astro', 'astro.openTsConfig', client);
93
+ activateTsVersionStatusItem('astro', 'astro.selectTypescriptVersion', context, (text) => text);
94
+
95
+ const volarLabs = createLabsInfo(protocol);
96
+ volarLabs.addLanguageClient(client);
97
+
98
+ return volarLabs.extensionExports;
99
+ }
100
+
101
+ export function deactivate(): Thenable<any> | undefined {
102
+ return client?.stop();
103
+ }
104
+
105
+ async function getConfiguredServerPath(workspaceState: vscode.Memento) {
106
+ const scope = 'astro.language-server';
107
+ const detailedLSPath = vscode.workspace.getConfiguration(scope).inspect<string>('ls-path');
108
+
109
+ const lsPath =
110
+ detailedLSPath?.globalLanguageValue ||
111
+ detailedLSPath?.defaultLanguageValue ||
112
+ detailedLSPath?.globalValue ||
113
+ detailedLSPath?.defaultValue;
114
+
115
+ const workspaceLSPath =
116
+ detailedLSPath?.workspaceFolderLanguageValue ||
117
+ detailedLSPath?.workspaceLanguageValue ||
118
+ detailedLSPath?.workspaceFolderValue ||
119
+ detailedLSPath?.workspaceValue;
120
+
121
+ const useLocalLanguageServerKey = `${scope}.useLocalLS`;
122
+ let useWorkspaceServer = workspaceState.get<boolean>(useLocalLanguageServerKey);
123
+
124
+ if (useWorkspaceServer === undefined && workspaceLSPath !== undefined) {
125
+ const msg =
126
+ 'This workspace contains an Astro Language Server version. Would you like to use the workplace version?';
127
+ const allowPrompt = 'Allow';
128
+ const dismissPrompt = 'Dismiss';
129
+ const neverPrompt = 'Never in This Workspace';
130
+
131
+ const result = await vscode.window.showInformationMessage(
132
+ msg,
133
+ allowPrompt,
134
+ dismissPrompt,
135
+ neverPrompt,
136
+ );
137
+
138
+ if (result === allowPrompt) {
139
+ await workspaceState.update(useLocalLanguageServerKey, true);
140
+ useWorkspaceServer = true;
141
+ } else if (result === neverPrompt) {
142
+ await workspaceState.update(useLocalLanguageServerKey, false);
143
+ }
144
+ }
145
+
146
+ if (useWorkspaceServer === true) {
147
+ return workspaceLSPath || lsPath;
148
+ } else {
149
+ return lsPath;
150
+ }
151
+ }
@@ -0,0 +1,5 @@
1
+ # Testing syntax files
2
+
3
+ This is a testing setup powered by [vscode-tmgrammar-test](https://github.com/PanAeon/vscode-tmgrammar-test) intended to test our `astro.tmLanguage.json` file to make sure it properly handle `.astro` files. To run it, simply run the `test:grammar` npm script from the repo
4
+
5
+ [Snapshots](https://github.com/PanAeon/vscode-tmgrammar-test#snapshot-tests) can be updated using the `update-grammar-snapshots` npm script, however, unless your changes affect the currently present snapshots, you should always make sure to run the tests (`pnpm test:grammar`) before updating the snapshots, to make sure your changes do not introduce regressions
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy CSS TextMate grammar for use in testing",
3
+ "scopeName": "source.css"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy HTML TextMate grammar for use in testing",
3
+ "scopeName": "text.html"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy JS TextMate grammar for use in testing",
3
+ "scopeName": "source.js"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy JSON TextMate grammar for use in testing",
3
+ "scopeName": "source.json"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy Less TextMate grammar for use in testing",
3
+ "scopeName": "source.css.less"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy PostCSS TextMate grammar for use in testing",
3
+ "scopeName": "source.css.postcss"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy Sass TextMate grammar for use in testing",
3
+ "scopeName": "source.sass"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy Scss TextMate grammar for use in testing",
3
+ "scopeName": "source.css.scss"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy Stylus TextMate grammar for use in testing",
3
+ "scopeName": "source.stylus"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy TS TextMate grammar for use in testing",
3
+ "scopeName": "source.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy TSX TextMate grammar for use in testing",
3
+ "scopeName": "source.tsx"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "comment": "Dummy Unknown TextMate grammar for use in testing",
3
+ "scopeName": "source.unknown"
4
+ }
@@ -0,0 +1,14 @@
1
+ <!-- Test special characters inside attributes names -->
2
+
3
+ <div @class></div>
4
+ <div class_name></div>
5
+ <div class.astro></div>
6
+ <div i18nReady></div>
7
+
8
+ <div onclick="console.log()"></div>
9
+
10
+ <div onload={"console.log('')"}></div>
11
+
12
+ <div onload=`console.log('')`></div>
13
+
14
+ <div class=`\${not-a-variable}`></div>
@@ -0,0 +1,102 @@
1
+ ><!-- Test special characters inside attributes names -->
2
+ #^^^^ source.astro comment.block.astro punctuation.definition.comment.astro
3
+ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.astro comment.block.astro
4
+ # ^^^ source.astro comment.block.astro punctuation.definition.comment.astro
5
+ >
6
+ ><div @class></div>
7
+ #^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
8
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
9
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
10
+ # ^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.@class.astro entity.other.attribute-name.astro
11
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
12
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
13
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
14
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
15
+ ><div class_name></div>
16
+ #^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
17
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
18
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
19
+ # ^^^^^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.class_name.astro entity.other.attribute-name.astro
20
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
21
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
22
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
23
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
24
+ ><div class.astro></div>
25
+ #^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
26
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
27
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
28
+ # ^^^^^^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.class.astro.astro entity.other.attribute-name.astro
29
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
30
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
31
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
32
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
33
+ ><div i18nReady></div>
34
+ #^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
35
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
36
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
37
+ # ^^^^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.i18nReady.astro entity.other.attribute-name.astro
38
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
39
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
40
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
41
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
42
+ >
43
+ ><div onclick="console.log()"></div>
44
+ #^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
45
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
46
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
47
+ # ^^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onclick.astro entity.other.attribute-name.astro
48
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onclick.astro punctuation.separator.key-value.astro
49
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onclick.astro meta.embedded.line.js string.quoted.astro punctuation.definition.string.begin.astro
50
+ # ^^^^^^^^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onclick.astro meta.embedded.line.js string.quoted.astro
51
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onclick.astro meta.embedded.line.js string.quoted.astro punctuation.definition.string.end.astro
52
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
53
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
54
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
55
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
56
+ >
57
+ ><div onload={"console.log('')"}></div>
58
+ #^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
59
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
60
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
61
+ # ^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onload.astro entity.other.attribute-name.astro
62
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onload.astro punctuation.separator.key-value.astro
63
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onload.astro punctuation.section.embedded.begin.astro
64
+ # ^^^^^^^^^^^^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onload.astro meta.embedded.expression.astro source.tsx
65
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onload.astro punctuation.section.embedded.end.astro
66
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
67
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
68
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
69
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
70
+ >
71
+ ><div onload=`console.log('')`></div>
72
+ #^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
73
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
74
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
75
+ # ^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onload.astro entity.other.attribute-name.astro
76
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onload.astro punctuation.separator.key-value.astro
77
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.onload.astro
78
+ # ^^^^^^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.console.log.astro entity.other.attribute-name.astro
79
+ # ^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
80
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
81
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
82
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
83
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
84
+ >
85
+ ><div class=`\${not-a-variable}`></div>
86
+ #^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
87
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
88
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
89
+ # ^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.class.astro entity.other.attribute-name.astro
90
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.class.astro punctuation.separator.key-value.astro
91
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.class.astro
92
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
93
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.attribute.$.astro entity.other.attribute-name.astro
94
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
95
+ # ^^^^^^^^^^^^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro meta.embedded.expression.astro source.tsx
96
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
97
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro
98
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
99
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
100
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
101
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
102
+ >
@@ -0,0 +1,3 @@
1
+ <Component>
2
+ <div></div>
3
+ </Component>
@@ -0,0 +1,17 @@
1
+ ><Component>
2
+ #^ source.astro meta.scope.tag.Component.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
3
+ # ^^^^^^^^^ source.astro meta.scope.tag.Component.astro meta.tag.start.astro support.class.component.astro
4
+ # ^ source.astro meta.scope.tag.Component.astro meta.tag.start.astro punctuation.definition.tag.end.astro
5
+ > <div></div>
6
+ #^ source.astro text.astro
7
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
8
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
9
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
10
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
11
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
12
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
13
+ ></Component>
14
+ #^^ source.astro meta.scope.tag.Component.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
15
+ # ^^^^^^^^^ source.astro meta.scope.tag.Component.astro meta.tag.end.astro support.class.component.astro
16
+ # ^ source.astro meta.scope.tag.Component.astro meta.tag.end.astro punctuation.definition.tag.end.astro
17
+ >
@@ -0,0 +1,7 @@
1
+ &#x210A; &#8458; &gscr; &#x210B; &#8459; &hamilt;
2
+
3
+ <div>
4
+ &#x210A; &#8458; &gscr; &#x210B; &#8459; &hamilt;<div>
5
+ &#x210A; &#8458; &gscr; &#x210B; &#8459; &hamilt;
6
+ </div>
7
+ </div>
@@ -0,0 +1,80 @@
1
+ >&#x210A; &#8458; &gscr; &#x210B; &#8459; &hamilt;
2
+ #^ source.astro constant.character.entity.numeric.hexadecimal.astro punctuation.definition.entity.astro
3
+ # ^^^^^^^ source.astro constant.character.entity.numeric.hexadecimal.astro
4
+ # ^ source.astro
5
+ # ^ source.astro constant.character.entity.numeric.decimal.astro punctuation.definition.entity.astro
6
+ # ^^^^^^ source.astro constant.character.entity.numeric.decimal.astro
7
+ # ^ source.astro
8
+ # ^ source.astro constant.character.entity.named.gscr.astro punctuation.definition.entity.astro
9
+ # ^^^^ source.astro constant.character.entity.named.gscr.astro
10
+ # ^ source.astro constant.character.entity.named.gscr.astro punctuation.definition.entity.astro
11
+ # ^ source.astro
12
+ # ^ source.astro constant.character.entity.numeric.hexadecimal.astro punctuation.definition.entity.astro
13
+ # ^^^^^^^ source.astro constant.character.entity.numeric.hexadecimal.astro
14
+ # ^ source.astro
15
+ # ^ source.astro constant.character.entity.numeric.decimal.astro punctuation.definition.entity.astro
16
+ # ^^^^^^ source.astro constant.character.entity.numeric.decimal.astro
17
+ # ^ source.astro
18
+ # ^ source.astro constant.character.entity.named.hamilt.astro punctuation.definition.entity.astro
19
+ # ^^^^^^ source.astro constant.character.entity.named.hamilt.astro
20
+ # ^ source.astro constant.character.entity.named.hamilt.astro punctuation.definition.entity.astro
21
+ >
22
+ ><div>
23
+ #^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
24
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
25
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
26
+ > &#x210A; &#8458; &gscr; &#x210B; &#8459; &hamilt;<div>
27
+ #^^ source.astro text.astro
28
+ # ^ source.astro text.astro constant.character.entity.numeric.hexadecimal.astro punctuation.definition.entity.astro
29
+ # ^^^^^^^ source.astro text.astro constant.character.entity.numeric.hexadecimal.astro
30
+ # ^ source.astro text.astro
31
+ # ^ source.astro text.astro constant.character.entity.numeric.decimal.astro punctuation.definition.entity.astro
32
+ # ^^^^^^ source.astro text.astro constant.character.entity.numeric.decimal.astro
33
+ # ^ source.astro text.astro
34
+ # ^ source.astro text.astro constant.character.entity.named.gscr.astro punctuation.definition.entity.astro
35
+ # ^^^^ source.astro text.astro constant.character.entity.named.gscr.astro
36
+ # ^ source.astro text.astro constant.character.entity.named.gscr.astro punctuation.definition.entity.astro
37
+ # ^ source.astro text.astro
38
+ # ^ source.astro text.astro constant.character.entity.numeric.hexadecimal.astro punctuation.definition.entity.astro
39
+ # ^^^^^^^ source.astro text.astro constant.character.entity.numeric.hexadecimal.astro
40
+ # ^ source.astro text.astro
41
+ # ^ source.astro text.astro constant.character.entity.numeric.decimal.astro punctuation.definition.entity.astro
42
+ # ^^^^^^ source.astro text.astro constant.character.entity.numeric.decimal.astro
43
+ # ^ source.astro text.astro
44
+ # ^ source.astro text.astro constant.character.entity.named.hamilt.astro punctuation.definition.entity.astro
45
+ # ^^^^^^ source.astro text.astro constant.character.entity.named.hamilt.astro
46
+ # ^ source.astro text.astro constant.character.entity.named.hamilt.astro punctuation.definition.entity.astro
47
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.begin.astro
48
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.start.astro entity.name.tag.astro
49
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.start.astro punctuation.definition.tag.end.astro
50
+ > &#x210A; &#8458; &gscr; &#x210B; &#8459; &hamilt;
51
+ #^^^^ source.astro text.astro
52
+ # ^ source.astro text.astro constant.character.entity.numeric.hexadecimal.astro punctuation.definition.entity.astro
53
+ # ^^^^^^^ source.astro text.astro constant.character.entity.numeric.hexadecimal.astro
54
+ # ^ source.astro text.astro
55
+ # ^ source.astro text.astro constant.character.entity.numeric.decimal.astro punctuation.definition.entity.astro
56
+ # ^^^^^^ source.astro text.astro constant.character.entity.numeric.decimal.astro
57
+ # ^ source.astro text.astro
58
+ # ^ source.astro text.astro constant.character.entity.named.gscr.astro punctuation.definition.entity.astro
59
+ # ^^^^ source.astro text.astro constant.character.entity.named.gscr.astro
60
+ # ^ source.astro text.astro constant.character.entity.named.gscr.astro punctuation.definition.entity.astro
61
+ # ^ source.astro text.astro
62
+ # ^ source.astro text.astro constant.character.entity.numeric.hexadecimal.astro punctuation.definition.entity.astro
63
+ # ^^^^^^^ source.astro text.astro constant.character.entity.numeric.hexadecimal.astro
64
+ # ^ source.astro text.astro
65
+ # ^ source.astro text.astro constant.character.entity.numeric.decimal.astro punctuation.definition.entity.astro
66
+ # ^^^^^^ source.astro text.astro constant.character.entity.numeric.decimal.astro
67
+ # ^ source.astro text.astro
68
+ # ^ source.astro text.astro constant.character.entity.named.hamilt.astro punctuation.definition.entity.astro
69
+ # ^^^^^^ source.astro text.astro constant.character.entity.named.hamilt.astro
70
+ # ^ source.astro text.astro constant.character.entity.named.hamilt.astro punctuation.definition.entity.astro
71
+ > </div>
72
+ #^^ source.astro text.astro
73
+ # ^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
74
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
75
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
76
+ ></div>
77
+ #^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.begin.astro
78
+ # ^^^ source.astro meta.scope.tag.div.astro meta.tag.end.astro entity.name.tag.astro
79
+ # ^ source.astro meta.scope.tag.div.astro meta.tag.end.astro punctuation.definition.tag.end.astro
80
+ >