Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"name": "Test Extension",
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: esbuild",
"request": "launch",
"type": "extensionHost"
}
]
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this belong in a contributing guide or the readme?

8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@
"language": "unison",
"scopeName": "source.u",
"path": "./syntaxes/unison.tmLanguage.json"
},
{
"path": "./syntaxes/unison-markdown-injection.tmLanguage.json",
"scopeName": "markdown.unison.codeblock",
"injectTo": ["text.html.markdown"],
"embeddedLanguages": {
"meta.embedded.unison": "unison"
}
}
],
"configuration": {
Expand Down
44 changes: 44 additions & 0 deletions syntaxes/unison-markdown-injection.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"scopeName": "markdown.unison.codeblock",
"injectionSelector": "L:text.html.markdown",
"patterns": [
{
"include": "#unison-code-block"
}
],
"repository": {
"unison-code-block": {
"begin": "(^|\\G)(\\s*)(\\`{3,}|~{3,})\\s*(?i:(unison)(\\s+[^`~]*)?$)",
"name": "markup.fenced.block.markdown",
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
"beginCaptures": {
"3": {
"name": "punctuation.definition.markdown"
},
"4": {
"name": "fenced.block.language.markdown"
},
"5": {
"name": "fenced.block.language.attributes.markdown"
}
},
"endCaptures": {
"3": {
"name": "punctuation.definition.markdown"
}
},
"patterns": [
{
"begin": "(^|\\G)(\\s*)(.*)",
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
"contentName": "meta.embedded.block.unison",
"patterns": [
{
"include": "source.u"
}
]
}
]
}
}
}