diff --git a/kusto-syntax-highlighting/images/kusto_logo_dark.png b/kusto-syntax-highlighting/images/kusto_logo_dark.png new file mode 100644 index 0000000..c24a726 Binary files /dev/null and b/kusto-syntax-highlighting/images/kusto_logo_dark.png differ diff --git a/kusto-syntax-highlighting/package.json b/kusto-syntax-highlighting/package.json index c73ff94..e2fd835 100644 --- a/kusto-syntax-highlighting/package.json +++ b/kusto-syntax-highlighting/package.json @@ -41,7 +41,11 @@ ".kusto", ".kql" ], - "configuration": "./language-configuration.json" + "configuration": "./language-configuration.json", + "icon": { + "light": "./images/kusto_logo.png", + "dark": "./images/kusto_logo_dark.png" + } } ], "grammars": [ @@ -49,6 +53,16 @@ "language": "kusto", "scopeName": "source.kusto", "path": "./syntaxes/kusto.tmLanguage.json" + }, + { + "scopeName": "markdown.kusto.codeblock", + "path": "./syntaxes/kusto-markdown-codeblock.json", + "injectTo": [ + "text.html.markdown" + ], + "embeddedLanguages": { + "meta.embedded.block.kusto": "kusto" + } } ] }, diff --git a/kusto-syntax-highlighting/syntaxes/kusto-markdown-codeblock.json b/kusto-syntax-highlighting/syntaxes/kusto-markdown-codeblock.json new file mode 100644 index 0000000..07e3ee4 --- /dev/null +++ b/kusto-syntax-highlighting/syntaxes/kusto-markdown-codeblock.json @@ -0,0 +1,45 @@ +{ + "fileTypes": [], + "injectionSelector": "L:text.html.markdown", + "patterns": [ + { + "include": "#fenced_code_block_kusto" + } + ], + "repository": { + "fenced_code_block_kusto": { + "name": "markup.fenced_code.block.markdown", + "begin": "(^|\\G)(\\s*)(\\`{3,}|~{3,})\\s*(?i:(kusto|kql|csl)(\\s+[^`~]*)?$)", + "end": "(^|\\G)(?=\\s*[`~]{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.kusto", + "patterns": [ + { + "include": "source.kusto" + } + ] + } + ] + } + }, + "scopeName": "markdown.kusto.codeblock" +}