astro-vscode 0.9.3 → 0.10.0
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/LICENSE +21 -0
- package/package.json +30 -83
- package/syntaxes/astro.tmLanguage.json +122 -87
- package/syntaxes/markdown.astro.tmLanguage.json +65 -0
- package/CHANGELOG.md +0 -317
- package/languages/astro-markdown-language-configuration.json +0 -44
- package/syntaxes/astro-markdown.tmLanguage.json +0 -2781
- package/syntaxes/astro.inject-to-markdown.tmLanguage.json +0 -87
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 The Astro Technology Company
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -8,15 +8,10 @@
|
|
|
8
8
|
"color": "#FFBE2D",
|
|
9
9
|
"theme": "dark"
|
|
10
10
|
},
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.10.0",
|
|
12
12
|
"author": "withastro",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"publisher": "astro-build",
|
|
15
|
-
"scripts": {
|
|
16
|
-
"vscode:prepublish": "yarn build",
|
|
17
|
-
"build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json",
|
|
18
|
-
"dev": "astro-scripts dev \"src/**/*.ts\""
|
|
19
|
-
},
|
|
20
15
|
"engines": {
|
|
21
16
|
"vscode": "^1.52.0"
|
|
22
17
|
},
|
|
@@ -29,8 +24,10 @@
|
|
|
29
24
|
"vscode-languageclient": "~7.0.0"
|
|
30
25
|
},
|
|
31
26
|
"devDependencies": {
|
|
32
|
-
"@types/vscode": "^1.
|
|
33
|
-
"astro-scripts": "
|
|
27
|
+
"@types/vscode": "^1.65.0",
|
|
28
|
+
"astro-scripts": "0.0.1",
|
|
29
|
+
"typescript": "~4.5.5",
|
|
30
|
+
"vscode-languageserver-protocol": "^3.16.0"
|
|
34
31
|
},
|
|
35
32
|
"main": "./dist/index.js",
|
|
36
33
|
"browser": "./dist/index.js",
|
|
@@ -155,99 +152,49 @@
|
|
|
155
152
|
"aliases": [
|
|
156
153
|
"Astro"
|
|
157
154
|
],
|
|
158
|
-
"configuration": "./languages/astro-language-configuration.json"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
"Astro Markdown"
|
|
164
|
-
],
|
|
165
|
-
"configuration": "./languages/astro-markdown-language-configuration.json"
|
|
155
|
+
"configuration": "./languages/astro-language-configuration.json",
|
|
156
|
+
"icon": {
|
|
157
|
+
"light": "./assets/lang-icon.svg",
|
|
158
|
+
"dark": "./assets/lang-icon.svg"
|
|
159
|
+
}
|
|
166
160
|
}
|
|
167
161
|
],
|
|
168
162
|
"grammars": [
|
|
169
163
|
{
|
|
170
164
|
"language": "astro",
|
|
171
|
-
"scopeName": "
|
|
165
|
+
"scopeName": "source.astro",
|
|
172
166
|
"path": "./syntaxes/astro.tmLanguage.json",
|
|
173
167
|
"embeddedLanguages": {
|
|
168
|
+
"text.html": "html",
|
|
169
|
+
"text.html.markdown": "markdown",
|
|
174
170
|
"source.css": "css",
|
|
171
|
+
"source.css.less": "less",
|
|
172
|
+
"source.css.scss": "scss",
|
|
175
173
|
"source.sass": "sass",
|
|
176
|
-
"source.
|
|
177
|
-
"source.ts": "typescript",
|
|
178
|
-
"source.tsx": "typescriptreact",
|
|
179
|
-
"text.html.astro": "astro",
|
|
180
|
-
"text.html.markdown.astro": "astro-markdown",
|
|
181
|
-
"text.html": "html"
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"language": "astro-markdown",
|
|
186
|
-
"scopeName": "text.html.markdown.astro",
|
|
187
|
-
"path": "./syntaxes/astro-markdown.tmLanguage.json",
|
|
188
|
-
"injectTo": [
|
|
189
|
-
"text.html.astro"
|
|
190
|
-
],
|
|
191
|
-
"embeddedLanguages": {
|
|
192
|
-
"meta.embedded.block.astro": "astro",
|
|
193
|
-
"meta.embedded.block.c": "c",
|
|
194
|
-
"meta.embedded.block.clojure": "clojure",
|
|
195
|
-
"meta.embedded.block.coffee": "coffee",
|
|
196
|
-
"meta.embedded.block.cpp": "cpp",
|
|
197
|
-
"meta.embedded.block.csharp": "csharp",
|
|
198
|
-
"meta.embedded.block.css": "css",
|
|
199
|
-
"meta.embedded.block.diff": "diff",
|
|
200
|
-
"meta.embedded.block.dockerfile": "dockerfile",
|
|
201
|
-
"meta.embedded.block.dosbatch": "dosbatch",
|
|
202
|
-
"meta.embedded.block.fsharp": "fsharp",
|
|
203
|
-
"meta.embedded.block.go": "go",
|
|
204
|
-
"meta.embedded.block.groovy": "groovy",
|
|
205
|
-
"meta.embedded.block.ini": "ini",
|
|
206
|
-
"meta.embedded.block.java": "java",
|
|
207
|
-
"meta.embedded.block.javascript": "javascript",
|
|
208
|
-
"meta.embedded.block.json": "json",
|
|
209
|
-
"meta.embedded.block.less": "less",
|
|
210
|
-
"meta.embedded.block.lua": "lua",
|
|
211
|
-
"meta.embedded.block.makefile": "makefile",
|
|
212
|
-
"meta.embedded.block.objc": "objc",
|
|
213
|
-
"meta.embedded.block.perl": "perl",
|
|
214
|
-
"meta.embedded.block.perl6": "perl6",
|
|
215
|
-
"meta.embedded.block.php": "php",
|
|
216
|
-
"meta.embedded.block.powershell": "powershell",
|
|
217
|
-
"meta.embedded.block.pug": "jade",
|
|
218
|
-
"meta.embedded.block.python": "python",
|
|
219
|
-
"meta.embedded.block.r": "r",
|
|
220
|
-
"meta.embedded.block.ruby": "ruby",
|
|
221
|
-
"meta.embedded.block.rust": "rust",
|
|
222
|
-
"meta.embedded.block.scala": "scala",
|
|
223
|
-
"meta.embedded.block.scss": "scss",
|
|
224
|
-
"meta.embedded.block.shellscript": "shellscript",
|
|
225
|
-
"meta.embedded.block.sql": "sql",
|
|
226
|
-
"meta.embedded.block.typescript": "typescript",
|
|
227
|
-
"meta.embedded.block.typescriptreact": "typescriptreact",
|
|
228
|
-
"meta.embedded.block.vs_net": "vs_net",
|
|
229
|
-
"meta.embedded.block.xml": "xml",
|
|
230
|
-
"meta.embedded.block.xsl": "xsl",
|
|
231
|
-
"meta.embedded.block.yaml": "yaml",
|
|
232
|
-
"source.css": "css",
|
|
174
|
+
"source.stylus": "stylus",
|
|
233
175
|
"source.js": "javascript",
|
|
234
176
|
"source.ts": "typescript",
|
|
235
|
-
"source.tsx": "typescriptreact"
|
|
236
|
-
"text.html.astro": "astro",
|
|
237
|
-
"text.html.markdown.astro": "astro-markdown",
|
|
238
|
-
"text.html.markdown": "markdown"
|
|
177
|
+
"source.tsx": "typescriptreact"
|
|
239
178
|
}
|
|
240
179
|
},
|
|
241
180
|
{
|
|
242
181
|
"scopeName": "text.html.markdown.astro",
|
|
243
|
-
"path": "./syntaxes/astro.
|
|
182
|
+
"path": "./syntaxes/markdown.astro.tmLanguage.json",
|
|
244
183
|
"injectTo": [
|
|
245
|
-
"text.html.markdown"
|
|
184
|
+
"text.html.markdown",
|
|
185
|
+
"source.astro"
|
|
246
186
|
],
|
|
247
187
|
"embeddedLanguages": {
|
|
248
|
-
"meta.embedded.block.astro": "astro"
|
|
188
|
+
"meta.embedded.block.astro": "astro",
|
|
189
|
+
"meta.embedded.block.astro.frontmatter": "typescriptreact"
|
|
249
190
|
}
|
|
250
191
|
}
|
|
251
192
|
]
|
|
252
|
-
}
|
|
253
|
-
|
|
193
|
+
},
|
|
194
|
+
"scripts": {
|
|
195
|
+
"vscode:prepublish": "pnpm build",
|
|
196
|
+
"build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json",
|
|
197
|
+
"dev": "astro-scripts dev \"src/**/*.ts\""
|
|
198
|
+
},
|
|
199
|
+
"readme": "# Astro support for Visual Studio Code\n\n> 🧑🚀 Not sure what Astro is? See our website at [astro.build](https://astro.build)!\n\nProvides language support for `.astro` files. This extension is powered by the [Astro language server](https://github.com/withastro/language-tools/tree/main/packages/language-server)\n\n## Features\n\n* [Go to Definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)\n* Code hover hints\n* Code completion\n* Function signatures\n* Syntax highlighting\n* Code folding\n* Emmet\n\n## Configuration\n\nYou can disable most features in the extension by going to your workspace settings page. Under __Extension__ find Astro configuration and uncheck the feature you do not want. For example to disable error messages unselect __TypeScript > Diagnostics: Enable__.\n\n## Troubleshooting\n\n### Cannot find name \"Astro\" or Property 'env' does not exist on type 'ImportMeta' or Cannot find name \"Fragment\"\n\nStarting from 0.23.5 version of Astro and the 0.9 version of this extension, typechecking is now done using types that are provided by Astro itself. Therefore, to benefit from those included types, you need to use any version of Astro that is higher or equal to 0.23.5\n\nIf you can't upgrade to a newer version of Astro for the moment, you can downgrade the extension to the latest pre 0.9.0 version by right clicking the Astro extension in the sidebar and pressing \"Install another version\"\n"
|
|
200
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"foldingStopMarker": "(?x)\n(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)>\n|^(?!.*?<!--).*?--\\s*>\n|^<!--\\ end\\ tminclude\\ -->$\n|<\\?(?:php)?.*\\bend(if|for(each)?|while)\\b\n|\\{\\{?/(if|foreach|capture|literal|foreach|php|section|strip)\n|^[^{]*\\}\n)",
|
|
6
6
|
"keyEquivalent": "^~H",
|
|
7
7
|
"name": "Astro",
|
|
8
|
-
"scopeName": "
|
|
8
|
+
"scopeName": "source.astro",
|
|
9
9
|
"patterns": [
|
|
10
10
|
{
|
|
11
11
|
"include": "#astro:markdown"
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
"include": "#astro:fragment"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
"include": "#astro:lang"
|
|
29
|
+
"include": "#astro:lang-scripts"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"include": "#astro:lang-styles"
|
|
30
33
|
},
|
|
31
34
|
{
|
|
32
35
|
"include": "#astro:component"
|
|
@@ -102,35 +105,26 @@
|
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
},
|
|
105
|
-
"astro:lang": {
|
|
106
|
-
"begin": "(<)(
|
|
108
|
+
"astro:lang-scripts": {
|
|
109
|
+
"begin": "(<)(script)",
|
|
110
|
+
"end": "(</)(script)\\s*(>)|(/>)",
|
|
107
111
|
"beginCaptures": {
|
|
108
|
-
"0": {
|
|
109
|
-
"name": "meta.tag.metadata.$2$3.start.html"
|
|
110
|
-
},
|
|
111
112
|
"1": {
|
|
112
113
|
"name": "punctuation.definition.tag.begin.html"
|
|
113
114
|
},
|
|
114
115
|
"2": {
|
|
115
|
-
"name": "entity.name.tag.astro support.class.component.astro"
|
|
116
|
-
},
|
|
117
|
-
"3": {
|
|
118
116
|
"name": "entity.name.tag.html"
|
|
119
117
|
}
|
|
120
118
|
},
|
|
121
|
-
"end": "(</)(?:(S(?i:cript|tyle))|((?i:script|style)))(?![\\w:-])\\s*(>)",
|
|
122
119
|
"endCaptures": {
|
|
123
|
-
"0": {
|
|
124
|
-
"name": "meta.tag.metadata.$2$3.end.html"
|
|
125
|
-
},
|
|
126
120
|
"1": {
|
|
127
121
|
"name": "punctuation.definition.tag.begin.html"
|
|
128
122
|
},
|
|
129
123
|
"2": {
|
|
130
|
-
"name": "entity.name.tag.
|
|
124
|
+
"name": "entity.name.tag.html"
|
|
131
125
|
},
|
|
132
126
|
"3": {
|
|
133
|
-
"name": "
|
|
127
|
+
"name": "punctuation.definition.tag.end.html"
|
|
134
128
|
},
|
|
135
129
|
"4": {
|
|
136
130
|
"name": "punctuation.definition.tag.end.html"
|
|
@@ -138,119 +132,151 @@
|
|
|
138
132
|
},
|
|
139
133
|
"patterns": [
|
|
140
134
|
{
|
|
141
|
-
"begin": "\\G",
|
|
142
|
-
"end": "(
|
|
143
|
-
"endCaptures": {
|
|
144
|
-
"1": {
|
|
145
|
-
"name": "punctuation.definition.tag.end.html"
|
|
146
|
-
}
|
|
147
|
-
},
|
|
135
|
+
"begin": "\\G(?=\\s*[^>]*?lang\\s*=\\s*(['\"]|)(?i:jsx?|javascript)\\1)",
|
|
136
|
+
"end": "(?=</|/>)",
|
|
148
137
|
"patterns": [
|
|
149
138
|
{
|
|
150
|
-
"
|
|
151
|
-
|
|
139
|
+
"begin": "(?<=>)(?!</)",
|
|
140
|
+
"end": "(?=</)",
|
|
141
|
+
"contentName": "source.js",
|
|
142
|
+
"patterns": [{ "include": "source.js" }]
|
|
143
|
+
},
|
|
144
|
+
{ "include": "#html:tag-attributes" }
|
|
152
145
|
]
|
|
153
146
|
},
|
|
154
147
|
{
|
|
155
|
-
"begin": "(
|
|
156
|
-
"end": "(
|
|
157
|
-
"contentName": "source.css",
|
|
148
|
+
"begin": "\\G(?=\\s*[^>]*?lang\\s*=\\s*(['\"]|)(?i:ts|typescript)\\1)",
|
|
149
|
+
"end": "(?=</|/>)",
|
|
158
150
|
"patterns": [
|
|
159
151
|
{
|
|
160
|
-
"
|
|
161
|
-
|
|
152
|
+
"begin": "(?<=>)(?!</)",
|
|
153
|
+
"end": "(?=</)",
|
|
154
|
+
"contentName": "source.ts",
|
|
155
|
+
"patterns": [{ "include": "source.ts" }]
|
|
156
|
+
},
|
|
157
|
+
{ "include": "#html:tag-attributes" }
|
|
162
158
|
]
|
|
163
159
|
},
|
|
164
160
|
{
|
|
165
|
-
"begin": "(
|
|
166
|
-
"end": "(
|
|
167
|
-
"contentName": "source.js",
|
|
161
|
+
"begin": "\\G(?=\\s*[^>]*?lang\\s*=\\s*(['\"]|)(?i:tsx)\\1)",
|
|
162
|
+
"end": "(?=</|/>)",
|
|
168
163
|
"patterns": [
|
|
169
164
|
{
|
|
170
|
-
"
|
|
171
|
-
|
|
165
|
+
"begin": "(?<=>)(?!</)",
|
|
166
|
+
"end": "(?=</)",
|
|
167
|
+
"contentName": "source.tsx",
|
|
168
|
+
"patterns": [{ "include": "source.tsx" }]
|
|
169
|
+
},
|
|
170
|
+
{ "include": "#html:tag-attributes" }
|
|
172
171
|
]
|
|
173
172
|
},
|
|
174
173
|
{
|
|
175
|
-
"begin": "(
|
|
176
|
-
"end": "(?=</
|
|
177
|
-
"contentName": "source.
|
|
178
|
-
"patterns": [
|
|
179
|
-
{
|
|
180
|
-
"include": "source.css.less"
|
|
181
|
-
}
|
|
182
|
-
]
|
|
174
|
+
"begin": "(?<=>)(?!</)",
|
|
175
|
+
"end": "(?=</)",
|
|
176
|
+
"contentName": "source.js",
|
|
177
|
+
"patterns": [{ "include": "source.js" }]
|
|
183
178
|
},
|
|
184
|
-
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
179
|
+
{ "include": "#html:tag-attributes" }
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"astro:lang-styles": {
|
|
183
|
+
"begin": "(<)(style)",
|
|
184
|
+
"end": "(</)(style)\\s*(>)|(/>)",
|
|
185
|
+
"beginCaptures": {
|
|
186
|
+
"1": {
|
|
187
|
+
"name": "punctuation.definition.tag.begin.html"
|
|
188
|
+
},
|
|
189
|
+
"2": {
|
|
190
|
+
"name": "entity.name.tag.html"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"endCaptures": {
|
|
194
|
+
"1": {
|
|
195
|
+
"name": "punctuation.definition.tag.begin.html"
|
|
196
|
+
},
|
|
197
|
+
"2": {
|
|
198
|
+
"name": "entity.name.tag.html"
|
|
199
|
+
},
|
|
200
|
+
"3": {
|
|
201
|
+
"name": "punctuation.definition.tag.end.html"
|
|
193
202
|
},
|
|
203
|
+
"4": {
|
|
204
|
+
"name": "punctuation.definition.tag.end.html"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"patterns": [
|
|
194
208
|
{
|
|
195
|
-
"begin": "(
|
|
196
|
-
"end": "(
|
|
197
|
-
"contentName": "source.css.scss",
|
|
209
|
+
"begin": "\\G(?=\\s*[^>]*?lang\\s*=\\s*(['\"]|)(?i:css)\\1)",
|
|
210
|
+
"end": "(?=</|/>)",
|
|
198
211
|
"patterns": [
|
|
199
212
|
{
|
|
200
|
-
"
|
|
201
|
-
|
|
213
|
+
"begin": "(?<=>)(?!</)",
|
|
214
|
+
"end": "(?=</)",
|
|
215
|
+
"contentName": "source.css",
|
|
216
|
+
"patterns": [{ "include": "source.css" }]
|
|
217
|
+
},
|
|
218
|
+
{ "include": "#html:tag-attributes" }
|
|
202
219
|
]
|
|
203
220
|
},
|
|
204
221
|
{
|
|
205
|
-
"begin": "(
|
|
206
|
-
|
|
207
|
-
"contentName": "source.stylus",
|
|
222
|
+
"begin": "\\G(?=\\s*[^>]*?lang\\s*=\\s*(['\"]|)(?i:less)\\1)",
|
|
223
|
+
"end": "(?=</|/>)",
|
|
208
224
|
"patterns": [
|
|
209
225
|
{
|
|
210
|
-
"
|
|
211
|
-
|
|
226
|
+
"begin": "(?<=>)(?!</)",
|
|
227
|
+
"end": "(?=</)",
|
|
228
|
+
"contentName": "source.css.less",
|
|
229
|
+
"patterns": [{ "include": "source.css.less" }]
|
|
230
|
+
},
|
|
231
|
+
{ "include": "#html:tag-attributes" }
|
|
212
232
|
]
|
|
213
233
|
},
|
|
214
234
|
{
|
|
215
|
-
"begin": "(
|
|
216
|
-
"end": "(
|
|
217
|
-
"contentName": "source.ts",
|
|
235
|
+
"begin": "\\G(?=\\s*[^>]*?lang\\s*=\\s*(['\"]|)(?i:sass)\\1)",
|
|
236
|
+
"end": "(?=</|/>)",
|
|
218
237
|
"patterns": [
|
|
219
238
|
{
|
|
220
|
-
"
|
|
221
|
-
|
|
239
|
+
"begin": "(?<=>)(?!</)",
|
|
240
|
+
"end": "(?=</)",
|
|
241
|
+
"contentName": "source.sass",
|
|
242
|
+
"patterns": [{ "include": "source.sass" }]
|
|
243
|
+
},
|
|
244
|
+
{ "include": "#html:tag-attributes" }
|
|
222
245
|
]
|
|
223
246
|
},
|
|
224
247
|
{
|
|
225
|
-
"begin": "(
|
|
226
|
-
"end": "(
|
|
227
|
-
"contentName": "source.tsx",
|
|
248
|
+
"begin": "\\G(?=\\s*[^>]*?lang\\s*=\\s*(['\"]|)(?i:scss)\\1)",
|
|
249
|
+
"end": "(?=</|/>)",
|
|
228
250
|
"patterns": [
|
|
229
251
|
{
|
|
230
|
-
"
|
|
231
|
-
|
|
252
|
+
"begin": "(?<=>)(?!</)",
|
|
253
|
+
"end": "(?=</)",
|
|
254
|
+
"contentName": "source.css.scss",
|
|
255
|
+
"patterns": [{ "include": "source.css.scss" }]
|
|
256
|
+
},
|
|
257
|
+
{ "include": "#html:tag-attributes" }
|
|
232
258
|
]
|
|
233
259
|
},
|
|
234
260
|
{
|
|
235
|
-
"begin": "(
|
|
236
|
-
"end": "(
|
|
237
|
-
"contentName": "source.js",
|
|
261
|
+
"begin": "\\G(?=\\s*[^>]*?lang\\s*=\\s*(['\"]|)(?i:styl(?:us)?)\\1)",
|
|
262
|
+
"end": "(?=</|/>)",
|
|
238
263
|
"patterns": [
|
|
239
264
|
{
|
|
240
|
-
"
|
|
241
|
-
|
|
265
|
+
"begin": "(?<=>)(?!</)",
|
|
266
|
+
"end": "(?=</)",
|
|
267
|
+
"contentName": "source.stylus",
|
|
268
|
+
"patterns": [{ "include": "source.stylus" }]
|
|
269
|
+
},
|
|
270
|
+
{ "include": "#html:tag-attributes" }
|
|
242
271
|
]
|
|
243
272
|
},
|
|
244
273
|
{
|
|
245
|
-
"begin": "(
|
|
246
|
-
"end": "(?=</
|
|
274
|
+
"begin": "(?<=>)(?!</)",
|
|
275
|
+
"end": "(?=</)",
|
|
247
276
|
"contentName": "source.css",
|
|
248
|
-
"patterns": [
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
]
|
|
253
|
-
}
|
|
277
|
+
"patterns": [{ "include": "source.css" }]
|
|
278
|
+
},
|
|
279
|
+
{ "include": "#html:tag-attributes" }
|
|
254
280
|
]
|
|
255
281
|
},
|
|
256
282
|
"html:attribute": {
|
|
@@ -265,6 +291,16 @@
|
|
|
265
291
|
}
|
|
266
292
|
}
|
|
267
293
|
},
|
|
294
|
+
"html:tag-attributes": {
|
|
295
|
+
"begin": "\\G",
|
|
296
|
+
"end": "(?=/>)|>",
|
|
297
|
+
"endCaptures": {
|
|
298
|
+
"0": {
|
|
299
|
+
"name": "punctuation.definition.tag.end.html"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"patterns": [{ "include": "#astro:attribute" }]
|
|
303
|
+
},
|
|
268
304
|
"html:comment": {
|
|
269
305
|
"name": "comment.block.html",
|
|
270
306
|
"begin": "<!--",
|
|
@@ -429,7 +465,6 @@
|
|
|
429
465
|
]
|
|
430
466
|
},
|
|
431
467
|
"astro:markdown": {
|
|
432
|
-
"name": "text.html.astro.markdown",
|
|
433
468
|
"begin": "(<)(Markdown)(>)",
|
|
434
469
|
"beginCaptures": {
|
|
435
470
|
"1": {
|
|
@@ -456,7 +491,7 @@
|
|
|
456
491
|
},
|
|
457
492
|
"patterns": [
|
|
458
493
|
{
|
|
459
|
-
"include": "text.html.markdown
|
|
494
|
+
"include": "text.html.markdown"
|
|
460
495
|
}
|
|
461
496
|
]
|
|
462
497
|
},
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
3
|
+
"scopeName": "text.html.markdown.astro",
|
|
4
|
+
"injectionSelector": "L:text.html.markdown",
|
|
5
|
+
"patterns": [
|
|
6
|
+
{
|
|
7
|
+
"include": "#fenced_code_block_astro"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"repository": {
|
|
11
|
+
"fenced_code_block_astro": {
|
|
12
|
+
"name": "markup.fenced_code.block.markdown",
|
|
13
|
+
"begin": "(^|\\G)(\\s*)(\\`{3,}|~{3,})\\s*(?i:astro(\\s+[^`~]*)?$)",
|
|
14
|
+
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
|
|
15
|
+
"beginCaptures": {
|
|
16
|
+
"3": {
|
|
17
|
+
"name": "punctuation.definition.markdown"
|
|
18
|
+
},
|
|
19
|
+
"5": {
|
|
20
|
+
"name": "fenced_code.block.language"
|
|
21
|
+
},
|
|
22
|
+
"6": {
|
|
23
|
+
"name": "fenced_code.block.language.attributes"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"endCaptures": {
|
|
27
|
+
"3": {
|
|
28
|
+
"name": "punctuation.definition.markdown"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"patterns": [
|
|
32
|
+
{
|
|
33
|
+
"begin": "(^|\\G)(\\s*)(.*)",
|
|
34
|
+
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
|
|
35
|
+
"patterns": [
|
|
36
|
+
{
|
|
37
|
+
"begin": "^\\s*---\\s*$",
|
|
38
|
+
"end": "^\\s*---\\s*$",
|
|
39
|
+
"beginCaptures": {
|
|
40
|
+
"0": {
|
|
41
|
+
"name": "punctuation.definition.tag.xi.begin.t"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"endCaptures": {
|
|
45
|
+
"0": {
|
|
46
|
+
"name": "punctuation.definition.tag.xi.end.t"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"contentName": "meta.embedded.block.astro.frontmatter",
|
|
50
|
+
"patterns": [
|
|
51
|
+
{
|
|
52
|
+
"include": "source.tsx"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"contentName": "meta.embedded.block.astro",
|
|
58
|
+
"include": "source.astro"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|