From 70de5026b801fb1a0eb54acc2d3685291c8e14f3 Mon Sep 17 00:00:00 2001 From: Matouš Dzivjak Date: Wed, 12 Apr 2023 17:28:03 +0200 Subject: feat(languages): Support markdoc (#6432) Add basic support for [markdoc](https://markdoc.dev/). For language server, see: https://github.com/markdoc-extra/markdoc-ls For tree sitter, see: https://github.com/markdoc-extra/tree-sitter-markdoc--- runtime/queries/markdoc/highlights.scm | 16 ++++++++++++++++ runtime/queries/markdoc/injections.scm | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 runtime/queries/markdoc/highlights.scm create mode 100644 runtime/queries/markdoc/injections.scm (limited to 'runtime/queries/markdoc') diff --git a/runtime/queries/markdoc/highlights.scm b/runtime/queries/markdoc/highlights.scm new file mode 100644 index 00000000..8251e9af --- /dev/null +++ b/runtime/queries/markdoc/highlights.scm @@ -0,0 +1,16 @@ +tag_name: (identifier) @tag +(tag_self_closing "/" @tag) +(tag_close "/" @tag) +([(tag_start) (tag_end) "="] @tag) +(attribute [key : (identifier)] @attribute) +(attribute [shorthand : (identifier)] @attribute) +(variable [variable : (identifier) (variable_sigil)] @variable) +(variable_tail property : (identifier) @variable.other.member) +(function function_name : (identifier) @function) +(function_parameter_named parameter : (identifier) @variable.parameter) + +(hash_key key: (identifier) @variable.other.member) +(string) @string +(number) @constant.numeric +(boolean) @constant.builtin.boolean +(null) @constant.builtin diff --git a/runtime/queries/markdoc/injections.scm b/runtime/queries/markdoc/injections.scm new file mode 100644 index 00000000..1594546b --- /dev/null +++ b/runtime/queries/markdoc/injections.scm @@ -0,0 +1,2 @@ +((markdown) @injection.content + (#set! injection.language "markdown")) -- cgit v1.2.3-70-g09d2