aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/markdown
diff options
context:
space:
mode:
authorGokul Soumya2021-12-18 03:03:15 +0000
committerGokul Soumya2021-12-18 03:03:15 +0000
commitd4fb1d06333315a3c6e9dc7f0ad8055d91551e3a (patch)
treef43da59eec8b897359b84390b1c7d5b69f3bb169 /runtime/queries/markdown
parent016640f4fb6f620df13a2cab15e749d623197a51 (diff)
parent3ef115d4203fab93f7efe4f65d8dd63cc4535b91 (diff)
Merge branch 'master' into cursor-shape-new
Diffstat (limited to 'runtime/queries/markdown')
-rw-r--r--runtime/queries/markdown/highlights.scm35
-rw-r--r--runtime/queries/markdown/injections.scm8
2 files changed, 43 insertions, 0 deletions
diff --git a/runtime/queries/markdown/highlights.scm b/runtime/queries/markdown/highlights.scm
new file mode 100644
index 00000000..a102719b
--- /dev/null
+++ b/runtime/queries/markdown/highlights.scm
@@ -0,0 +1,35 @@
+[
+ (atx_heading)
+ (setext_heading)
+] @markup.heading
+
+(code_fence_content) @none
+
+[
+ (indented_code_block)
+ (fenced_code_block)
+] @markup.raw.block
+
+(code_span) @markup.raw.inline
+
+(emphasis) @markup.italic
+
+(strong_emphasis) @markup.bold
+
+(link_destination) @markup.underline.link
+
+; (link_label) @markup.label ; TODO: rename
+
+[
+ (list_marker_plus)
+ (list_marker_minus)
+ (list_marker_star)
+ (list_marker_dot)
+ (list_marker_parenthesis)
+] @punctuation.special
+
+[
+ (backslash_escape)
+ (hard_line_break)
+] @string.character.escape
+
diff --git a/runtime/queries/markdown/injections.scm b/runtime/queries/markdown/injections.scm
new file mode 100644
index 00000000..ff3c5fe6
--- /dev/null
+++ b/runtime/queries/markdown/injections.scm
@@ -0,0 +1,8 @@
+(fenced_code_block
+ (info_string) @injection.language
+ (code_fence_content) @injection.content)
+
+((html_block) @injection.content
+ (#set! injection.language "html"))
+((html_tag) @injection.content
+ (#set! injection.language "html"))