chore: add mdc to Code extension
This commit is contained in:
parent
2d99baee53
commit
6ae81296d7
9 changed files with 31 additions and 17 deletions
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
|
@ -7,8 +7,8 @@
|
|||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": ["--extensionDevelopmentPath=${workspaceRoot}/tools/astro-vscode"],
|
||||
"outFiles": ["${workspaceRoot}/tools/astro-vscode/dist/**/*.js"]
|
||||
"args": ["--extensionDevelopmentPath=${workspaceRoot}/tools/vscode"],
|
||||
"outFiles": ["${workspaceRoot}/tools/vscode/dist/**/*.js"]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export default {
|
||||
markdownOptions: {
|
||||
components: './src/components/index.tsx'
|
||||
components: './src/components/index.ts'
|
||||
}
|
||||
}
|
||||
|
|
1
examples/with-markdown/src/components/index.ts
Normal file
1
examples/with-markdown/src/components/index.ts
Normal file
|
@ -0,0 +1 @@
|
|||
export { default as PreactCounter } from './PreactCounter.js';
|
|
@ -1 +0,0 @@
|
|||
export { default as PreactCounter } from './PreactCounter.tsx';
|
|
@ -9,4 +9,4 @@ text here.
|
|||
|
||||
<PreactCounter client:visible />
|
||||
|
||||
Hello world!
|
||||
Hey, this is a demo!
|
||||
|
|
|
@ -77,11 +77,14 @@
|
|||
"configuration": "./languages/astro-language-configuration.json"
|
||||
},
|
||||
{
|
||||
"id": "astro-markdown",
|
||||
"aliases": [
|
||||
"Astro Markdown"
|
||||
"id": "mdc",
|
||||
"extensions": [
|
||||
".mdc"
|
||||
],
|
||||
"configuration": "./languages/astro-markdown-language-configuration.json"
|
||||
"aliases": [
|
||||
"Markdown + Components"
|
||||
],
|
||||
"configuration": "./languages/mdc-language-configuration.json"
|
||||
}
|
||||
],
|
||||
"grammars": [
|
||||
|
@ -91,7 +94,7 @@
|
|||
"path": "./syntaxes/astro.tmLanguage.json",
|
||||
"embeddedLanguages": {
|
||||
"text.html.astro": "astro",
|
||||
"text.html.markdown.astro": "astro-markdown",
|
||||
"text.html.markdown.astro": "mdc",
|
||||
"text.html": "html",
|
||||
"source.css": "css",
|
||||
"source.scss": "scss",
|
||||
|
@ -101,19 +104,20 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"language": "astro-markdown",
|
||||
"language": "mdc",
|
||||
"scopeName": "text.html.markdown.astro",
|
||||
"path": "./syntaxes/astro-markdown.tmLanguage.json",
|
||||
"path": "./syntaxes/mdc.tmLanguage.json",
|
||||
"injectTo": [
|
||||
"text.html.astro"
|
||||
],
|
||||
"embeddedLanguages": {
|
||||
"text.html.astro": "astro",
|
||||
"text.html.markdown.astro": "astro-markdown",
|
||||
"text.html.markdown.astro": "mdc",
|
||||
"text.html.markdown": "markdown",
|
||||
"source.tsx": "typescriptreact",
|
||||
"source.js": "javascript",
|
||||
"source.css": "css",
|
||||
"meta.embedded.block.frontmatter": "yaml",
|
||||
"meta.embedded.block.css": "css",
|
||||
"meta.embedded.block.astro": "astro",
|
||||
"meta.embedded.block.ini": "ini",
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
"name": "Astro Markdown",
|
||||
"scopeName": "text.html.markdown.astro",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#frontMatter"
|
||||
},
|
||||
{
|
||||
"include": "#block"
|
||||
},
|
||||
|
@ -11,6 +14,16 @@
|
|||
}
|
||||
],
|
||||
"repository": {
|
||||
"frontMatter": {
|
||||
"begin": "\\A-{3}\\s*$",
|
||||
"contentName": "meta.embedded.block.frontmatter",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.yaml"
|
||||
}
|
||||
],
|
||||
"end": "(^|\\G)-{3}|\\.{3}\\s*$"
|
||||
},
|
||||
"astro-expressions": {
|
||||
"patterns": [
|
||||
{
|
|
@ -9,9 +9,6 @@
|
|||
"declaration": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@astro-vscode/*": ["packages/*/src"]
|
||||
}
|
||||
"baseUrl": "./"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue