summaryrefslogtreecommitdiff
path: root/editors/vscode/syntaxes/codeblock.json
diff options
context:
space:
mode:
Diffstat (limited to 'editors/vscode/syntaxes/codeblock.json')
-rw-r--r--editors/vscode/syntaxes/codeblock.json45
1 files changed, 45 insertions, 0 deletions
diff --git a/editors/vscode/syntaxes/codeblock.json b/editors/vscode/syntaxes/codeblock.json
new file mode 100644
index 0000000..0f3ee2e
--- /dev/null
+++ b/editors/vscode/syntaxes/codeblock.json
@@ -0,0 +1,45 @@
+{
+ "comment": "Taken from https://github.com/microsoft/vscode/blob/main/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json",
+ "injectionSelector": "L:text.html.markdown",
+ "patterns": [
+ {
+ "include": "#fenced_code_block_odin"
+ }
+ ],
+ "repository": {
+ "fenced_code_block_odin": {
+ "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(odin)((\\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.odin",
+ "patterns": [
+ {
+ "include": "source.odin"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "scopeName": "markdown.odin.codeblock"
+}