chore: add mdc to Code extension

This commit is contained in:
Nate Moore 2021-07-09 11:46:31 -05:00
parent 2d99baee53
commit 6ae81296d7
9 changed files with 31 additions and 17 deletions

4
.vscode/launch.json vendored
View file

@ -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",

View file

@ -1,5 +1,5 @@
export default {
markdownOptions: {
components: './src/components/index.tsx'
components: './src/components/index.ts'
}
}

View file

@ -0,0 +1 @@
export { default as PreactCounter } from './PreactCounter.js';

View file

@ -1 +0,0 @@
export { default as PreactCounter } from './PreactCounter.tsx';

View file

@ -9,4 +9,4 @@ text here.
<PreactCounter client:visible />
Hello world!
Hey, this is a demo!

View file

@ -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",

View file

@ -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": [
{

View file

@ -9,9 +9,6 @@
"declaration": true,
"strict": true,
"skipLibCheck": true,
"baseUrl": "./",
"paths": {
"@astro-vscode/*": ["packages/*/src"]
}
"baseUrl": "./"
}
}