summaryrefslogtreecommitdiffstats
path: root/queries/markdown
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-12-13 21:29:07 +0100
committerStephan Seitz <stephan.seitz@fau.de>2021-12-14 15:00:14 +0100
commit387a8f38bd1ee25321b59bb08d23641f113f85da (patch)
tree8bb28c4497d413201b6c924fb11b57f825582609 /queries/markdown
parentfeat(lang): add make (diff)
downloadnvim-treesitter-387a8f38bd1ee25321b59bb08d23641f113f85da.tar
nvim-treesitter-387a8f38bd1ee25321b59bb08d23641f113f85da.tar.gz
nvim-treesitter-387a8f38bd1ee25321b59bb08d23641f113f85da.tar.bz2
nvim-treesitter-387a8f38bd1ee25321b59bb08d23641f113f85da.tar.lz
nvim-treesitter-387a8f38bd1ee25321b59bb08d23641f113f85da.tar.xz
nvim-treesitter-387a8f38bd1ee25321b59bb08d23641f113f85da.tar.zst
nvim-treesitter-387a8f38bd1ee25321b59bb08d23641f113f85da.zip
parsers: Add MDeiml/tree-sitter-markdown as markdown parser
Fixes #872
Diffstat (limited to 'queries/markdown')
-rw-r--r--queries/markdown/highlights.scm40
-rw-r--r--queries/markdown/injections.scm1
2 files changed, 28 insertions, 13 deletions
diff --git a/queries/markdown/highlights.scm b/queries/markdown/highlights.scm
index 268d0c1c9..55dcc918d 100644
--- a/queries/markdown/highlights.scm
+++ b/queries/markdown/highlights.scm
@@ -1,21 +1,35 @@
-(atx_heading) @text.title
-
+;; From MDeiml/tree-sitter-markdown
[
- (code_span)
- (fenced_code_block)
-]@text.literal
+ (atx_heading)
+ (setext_heading)
+] @text.title
(code_fence_content) @none
[
- (link_text)
- (image_description)
-] @text.strong
+ (indented_code_block)
+ (fenced_code_block)
+ (code_span)
+] @text.literal
+
+
+(emphasis) @text.emphasis
+
+(strong_emphasis) @text.strong
-[
- (emphasis)
- (strong_emphasis)
-] @text.emphasis
(link_destination) @text.uri
-(html_comment) @comment
+(link_label) @text.reference
+
+[
+ (list_marker_plus)
+ (list_marker_minus)
+ (list_marker_star)
+ (list_marker_dot)
+ (list_marker_parenthesis)
+] @punctuation.special
+
+[
+ (backslash_escape)
+ (hard_line_break)
+] @string.escape
diff --git a/queries/markdown/injections.scm b/queries/markdown/injections.scm
index 42328ad24..f27248330 100644
--- a/queries/markdown/injections.scm
+++ b/queries/markdown/injections.scm
@@ -3,3 +3,4 @@
(code_fence_content) @content)
((html_block) @html)
+((html_tag) @html)