summary refs log tree commit diff
path: root/.vim/after/queries.bak/markdown/highlights.scm
blob: 9aba3850f4620ac2bff6aa35458f8841b76a5cbf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
;; inherits: markdown
;; extends

;From MDeiml/tree-sitter-markdown & Helix

(list_item (task_list_marker_checked)) @comment (#set! "priority" 90)

[
  (list_marker_plus)
  (list_marker_minus)
  (list_marker_star)
  (list_marker_dot)
  (list_marker_parenthesis)
  (thematic_break)
] @string

[
  (task_list_marker_checked)
  (task_list_marker_unchecked)
] @task_marker

[
 (atx_h1_marker)
 (atx_h2_marker)
 (atx_h3_marker)
 (atx_h4_marker)
 (atx_h5_marker)
 (atx_h6_marker)
] @header_marker

(atx_heading) @header_content

; concealing
((atx_h1_marker) @header_marker.h1
  (#offset! @header_marker.h1 0 0 0 0)
  ;(#set! conceal "󰉫 ")
)

((atx_h2_marker) @header_marker.h2
  (#offset! @header_marker.h2 0 0 0 0)
  ;(#set! conceal "󰉬 ")
)

((atx_h3_marker) @header_marker.h3
  (#offset! @header_marker.h3 0 0 0 0)
  ;(#set! conceal "󰉭 ")
)

((atx_h4_marker) @header_marker.h4
  (#offset! @header_marker.h4 0 0 0 0)
  ;(#set! conceal "󰉮 ")
)

((atx_h5_marker) @header_marker.h5
  (#offset! @header_marker.h5 0 0 0 0)
  ;(#set! conceal "󰉯 ")
)

((atx_h6_marker) @header_marker.h6
  (#offset! @header_marker.h6 0 0 0 0)
  ;(#set! conceal "󰉰 ")
)

; used for first level list items
((list_marker_star) @list_marker.star
  (#offset! @list_marker.star 0 0 0 -1)
  ;(#set! conceal "󰅂 ")
)
; used for second level list items
((list_marker_minus) @list_marker.minus
  (#offset! @list_marker.minus 0 0 0 -1)
  ;(#set! conceal "󰍴 ")
)

((list_marker_plus) @list_marker.plus
  (#offset! @list_marker.plus 0 0 0 -1)
  ;(#set! conceal "󰍴 ")
)
((list_marker_dot) @list_marker.dot
  (#offset! @list_marker.dot 0 0 0 -1)
  ;(#set! conceal "󰍴 ")
)
((list_marker_parenthesis) @list_marker.parenthesis
  (#offset! @list_marker.parenthesis 0 0 0 -1)
  ;(#set! conceal "󰍴 ")
)

;; replace '[x]' with 󰄲
((task_list_marker_checked) @text.todo.checked
  (#offset! @text.todo.checked 0 -2 0 0)
  (#set! conceal "☑ ")
)

;; replace '[ ]' with 󰄱
((task_list_marker_unchecked) @text.todo.unchecked
  (#offset! @text.todo.unchecked 0 -2 0 0)
  (#set! conceal "☐ ")
)

([(minus_metadata)] @comment)