Add newt highlighting for markdown files
This commit is contained in:
@@ -37,6 +37,16 @@
|
||||
"language": "newt",
|
||||
"scopeName": "source.newt",
|
||||
"path": "./syntaxes/newt.tmLanguage.json"
|
||||
},
|
||||
{
|
||||
"path": "./syntaxes/inject.json",
|
||||
"scopeName": "newt.injection",
|
||||
"injectTo": [
|
||||
"text.html.markdown"
|
||||
],
|
||||
"embeddedLanguages": {
|
||||
"meta.embedded.block.idris": "newt"
|
||||
}
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
|
||||
44
newt-vscode/syntaxes/inject.json
Normal file
44
newt-vscode/syntaxes/inject.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"scopeName": "newt.injection",
|
||||
"injectionSelector": "L:text.html.markdown",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#fenced_code_block_newt"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"fenced_code_block_newt": {
|
||||
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(newt)((\\s+|:|,|\\{|\\?)[^`]*)?$)",
|
||||
"name": "markup.fenced_code.block.markdown",
|
||||
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
|
||||
"beginCaptures": {
|
||||
"3": {
|
||||
"name": "punctuation.definition.markdown"
|
||||
},
|
||||
"4": {
|
||||
"name": "fenced_code.block.language.markdown"
|
||||
},
|
||||
"5": {
|
||||
"name": "fenced_code.block.language.attributes.markdown"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"3": {
|
||||
"name": "punctuation.definition.markdown"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(^|\\G)(\\s*)(.*)",
|
||||
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
|
||||
"contentName": "meta.embedded.block.newt",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.newt"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user