aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/markdoc/highlights.scm16
-rw-r--r--runtime/queries/markdoc/injections.scm2
2 files changed, 18 insertions, 0 deletions
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"))