aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-03-17 13:19:43 +0100
committerChristian Clason <c.clason@uni-graz.at>2024-03-19 09:41:16 +0100
commit5e875ae8d07dd204ce5b1d97a8acf70e3835b40b (patch)
tree2801a123c921905a20779ac1584adc306286772c
parentff6092b4ee3c9a240e9b65e99ed6640d8503cf24 (diff)
downloadrneovim-5e875ae8d07dd204ce5b1d97a8acf70e3835b40b.tar.gz
rneovim-5e875ae8d07dd204ce5b1d97a8acf70e3835b40b.tar.bz2
rneovim-5e875ae8d07dd204ce5b1d97a8acf70e3835b40b.zip
feat(treesitter): update Markdown parsers and queries to v0.2.1
-rw-r--r--cmake.deps/deps.txt4
-rw-r--r--runtime/queries/markdown/highlights.scm26
-rw-r--r--runtime/queries/markdown_inline/highlights.scm8
3 files changed, 21 insertions, 17 deletions
diff --git a/cmake.deps/deps.txt b/cmake.deps/deps.txt
index e8dbebc055..05d1b1b6cf 100644
--- a/cmake.deps/deps.txt
+++ b/cmake.deps/deps.txt
@@ -55,7 +55,7 @@ TREESITTER_PYTHON_URL https://github.com/tree-sitter/tree-sitter-python/archive/
TREESITTER_PYTHON_SHA256 720304a603271fa89e4430a14d6a81a023d6d7d1171b1533e49c0ab44f1e1c13
TREESITTER_BASH_URL https://github.com/tree-sitter/tree-sitter-bash/archive/v0.21.0.tar.gz
TREESITTER_BASH_SHA256 f0515efda839cfede851adb24ac154227fbc0dfb60c6c11595ecfa9087d43ceb
-TREESITTER_MARKDOWN_URL https://github.com/MDeiml/tree-sitter-markdown/archive/v0.1.7.tar.gz
-TREESITTER_MARKDOWN_SHA256 7d0e7f7ed4516ed0816f9c304e2e7fa93b2c16f9280416c2fb64dc4efd9c5f83
+TREESITTER_MARKDOWN_URL https://github.com/MDeiml/tree-sitter-markdown/archive/v0.2.1.tar.gz
+TREESITTER_MARKDOWN_SHA256 d5dee1f57807a633062d03e19ad59d9b5e28f882da1ebe69a2e31f1df5b308ca
TREESITTER_URL https://github.com/tree-sitter/tree-sitter/archive/v0.22.2.tar.gz
TREESITTER_SHA256 0c829523b876d4a37e1bd46a655c133a93669c0fe98fcd84972b168849c27afc
diff --git a/runtime/queries/markdown/highlights.scm b/runtime/queries/markdown/highlights.scm
index 7c26fd710c..ac582e3f9b 100644
--- a/runtime/queries/markdown/highlights.scm
+++ b/runtime/queries/markdown/highlights.scm
@@ -1,34 +1,34 @@
;From MDeiml/tree-sitter-markdown & Helix
(setext_heading
(paragraph) @markup.heading.1
- (setext_h1_underline) @markup.heading.1.marker)
+ (setext_h1_underline) @markup.heading.1)
(setext_heading
(paragraph) @markup.heading.2
- (setext_h2_underline) @markup.heading.2.marker)
+ (setext_h2_underline) @markup.heading.2)
(atx_heading
- (atx_h1_marker) @markup.heading.1.marker
+ (atx_h1_marker) @markup.heading.1
(inline) @markup.heading.1)
(atx_heading
- (atx_h2_marker) @markup.heading.2.marker
+ (atx_h2_marker) @markup.heading.2
(inline) @markup.heading.2)
(atx_heading
- (atx_h3_marker) @markup.heading.3.marker
+ (atx_h3_marker) @markup.heading.3
(inline) @markup.heading.3)
(atx_heading
- (atx_h4_marker) @markup.heading.4.marker
+ (atx_h4_marker) @markup.heading.4
(inline) @markup.heading.4)
(atx_heading
- (atx_h5_marker) @markup.heading.5.marker
+ (atx_h5_marker) @markup.heading.5
(inline) @markup.heading.5)
(atx_heading
- (atx_h6_marker) @markup.heading.6.marker
+ (atx_h6_marker) @markup.heading.6
(inline) @markup.heading.6)
(info_string) @label
@@ -54,12 +54,12 @@
(#set! "priority" 90))
(fenced_code_block
- (fenced_code_block_delimiter) @markup.raw.delimiter
+ (fenced_code_block_delimiter) @markup.raw.block
(#set! conceal ""))
(fenced_code_block
(info_string
- (language) @conceal
+ (language) @label
(#set! conceal "")))
(link_destination) @markup.link.url
@@ -69,6 +69,10 @@
(link_label)
] @markup.link.label
+((link_label)
+ .
+ ":" @punctuation.delimiter)
+
[
(list_marker_plus)
(list_marker_minus)
@@ -79,7 +83,7 @@
; NOTE: The following has been commented out due to issues with spaces in the
; list marker nodes generated by the parser. If those spaces ever get captured
-; by a different node (e.g. block_continuation) we can safely readd these
+; by a different node (e.g. block_continuation) we can safely re-add these
; conceals.
; ;; Conceal bullet points
; ([(list_marker_plus) (list_marker_star)]
diff --git a/runtime/queries/markdown_inline/highlights.scm b/runtime/queries/markdown_inline/highlights.scm
index 5f3519777f..e38ef3d7b0 100644
--- a/runtime/queries/markdown_inline/highlights.scm
+++ b/runtime/queries/markdown_inline/highlights.scm
@@ -16,10 +16,10 @@
] @string.escape
; Conceal codeblock and text style markers
-((code_span_delimiter) @markup.raw.delimiter
- (#set! conceal ""))
-
-((emphasis_delimiter) @conceal
+([
+ (code_span_delimiter)
+ (emphasis_delimiter)
+] @conceal
(#set! conceal ""))
; Conceal inline links