on master help sign in
Add link and quote queries for markdown
7c01d92Gokul Soumya
book/src/themes.md+4−2
@@ -105,6 +105,7 @@ We use a similar set of scopes as
105
105
106- `type` - Types
106- `type` - Types
107 - `builtin` - Primitive types provided by the language (`int`, `usize`)
107 - `builtin` - Primitive types provided by the language (`int`, `usize`)
108+- `constructor`
108
109
109- `constant` (TODO: constant.other.placeholder for %v)
110- `constant` (TODO: constant.other.placeholder for %v)
110 - `builtin` Special constants provided by the language (`true`, `false`, `nil` etc)
111 - `builtin` Special constants provided by the language (`true`, `false`, `nil` etc)
@@ -169,8 +170,9 @@ We use a similar set of scopes as
169 - `numbered`
170 - `numbered`
170 - `bold`
171 - `bold`
171 - `italic`
172 - `italic`
172− - `underline`
173− - `link`
173+ - `link`
174+ - `url`
175+ - `label`
174 - `quote`
176 - `quote`
175 - `raw`
177 - `raw`
176 - `inline`
178 - `inline`
runtime/queries/latex/highlights.scm+1−1
@@ -371,7 +371,7 @@
371((generic_command
371((generic_command
372 name:(generic_command_name) @_name
372 name:(generic_command_name) @_name
373 .
373 .
374− arg: (_) @markup.underline.link)
374+ arg: (_) @markup.link.url)
375 (#match? @_name "^(\\\\url|\\\\href)$"))
375 (#match? @_name "^(\\\\url|\\\\href)$"))
376
376
377(ERROR) @error
377(ERROR) @error
runtime/queries/markdown/highlights.scm+4−3
@@ -10,15 +10,16 @@
10 (fenced_code_block)
10 (fenced_code_block)
11] @markup.raw.block
11] @markup.raw.block
12
12
13+(block_quote) @markup.quote
14+
13(code_span) @markup.raw.inline
15(code_span) @markup.raw.inline
14
16
15(emphasis) @markup.italic
17(emphasis) @markup.italic
16
18
17(strong_emphasis) @markup.bold
19(strong_emphasis) @markup.bold
18
20
19−(link_destination) @markup.underline.link
21+(link_destination) @markup.link.url
20−
21−; (link_label) @markup.label ; TODO: rename
22+(link_label) @markup.link.label
22
23
23[
24[
24 (list_marker_plus)
25 (list_marker_plus)
runtime/queries/svelte/highlights.scm+2−2
@@ -20,12 +20,12 @@
20((element (start_tag (tag_name) @_tag) (text) @markup.inline)
20((element (start_tag (tag_name) @_tag) (text) @markup.inline)
21 (#match? @_tag "^(code|kbd)$"))
21 (#match? @_tag "^(code|kbd)$"))
22
22
23−((element (start_tag (tag_name) @_tag) (text) @markup.underline.link)
23+((element (start_tag (tag_name) @_tag) (text) @markup.link.url)
24 (#eq? @_tag "a"))
24 (#eq? @_tag "a"))
25
25
26((attribute
26((attribute
27 (attribute_name) @_attr
27 (attribute_name) @_attr
28− (quoted_attribute_value (attribute_value) @markup.underline.link))
28+ (quoted_attribute_value (attribute_value) @markup.link.url))
29 (#match? @_attr "^(href|src)$"))
29 (#match? @_attr "^(href|src)$"))
30
30
31(tag_name) @tag
31(tag_name) @tag
theme.toml+1−1
@@ -31,7 +31,7 @@ label = "honey"
31"markup.heading" = "lilac"
31"markup.heading" = "lilac"
32"markup.bold" = { modifiers = ["bold"] }
32"markup.bold" = { modifiers = ["bold"] }
33"markup.italic" = { modifiers = ["italic"] }
33"markup.italic" = { modifiers = ["italic"] }
34−"markup.underline.link" = { fg = "silver", modifiers = ["underlined"] }
34+"markup.link.url" = { fg = "silver", modifiers = ["underlined"] }
35"markup.raw" = "almond"
35"markup.raw" = "almond"
36
36
37# TODO: diferentiate doc comment
37# TODO: diferentiate doc comment