on master help sign in
Add link and quote queries for markdown

- Rename markup.underline.link to markup.link.url - Add markup.link.label - Add markup.quote (The constructor theme scope was missing from the docs, so unrelated to this commit).

commit7c01d926536bcaacc92bbf4a2b1a06e96e6268a0 authorGokul Soumya <gokulps15@gmail.com> dateSun 19 Dec 2021, 00:05 (5 years ago) parent8208d22
5 files changed+12−9
book/src/themes.md+4−2 runtime/queries/latex/highlights.scm+1−1 runtime/queries/markdown/highlights.scm+4−3 runtime/queries/svelte/highlights.scm+2−2 theme.toml+1−1
book/src/themes.md+4−2
@@ -105,6 +105,7 @@ We use a similar set of scopes as
105105
106106- `type` - Types
107107 - `builtin` - Primitive types provided by the language (`int`, `usize`)
108+- `constructor`
108109
109110- `constant` (TODO: constant.other.placeholder for %v)
110111 - `builtin` Special constants provided by the language (`true`, `false`, `nil` etc)
@@ -169,8 +170,9 @@ We use a similar set of scopes as
169170 - `numbered`
170171 - `bold`
171172 - `italic`
172− - `underline`
173− - `link`
173+ - `link`
174+ - `url`
175+ - `label`
174176 - `quote`
175177 - `raw`
176178 - `inline`
runtime/queries/latex/highlights.scm+1−1
@@ -371,7 +371,7 @@
371371((generic_command
372372 name:(generic_command_name) @_name
373373 .
374− arg: (_) @markup.underline.link)
374+ arg: (_) @markup.link.url)
375375 (#match? @_name "^(\\\\url|\\\\href)$"))
376376
377377(ERROR) @error
runtime/queries/markdown/highlights.scm+4−3
@@ -10,15 +10,16 @@
1010 (fenced_code_block)
1111] @markup.raw.block
1212
13+(block_quote) @markup.quote
14+
1315(code_span) @markup.raw.inline
1416
1517(emphasis) @markup.italic
1618
1719(strong_emphasis) @markup.bold
1820
19−(link_destination) @markup.underline.link
20−
21−; (link_label) @markup.label ; TODO: rename
21+(link_destination) @markup.link.url
22+(link_label) @markup.link.label
2223
2324[
2425 (list_marker_plus)
runtime/queries/svelte/highlights.scm+2−2
@@ -20,12 +20,12 @@
2020((element (start_tag (tag_name) @_tag) (text) @markup.inline)
2121 (#match? @_tag "^(code|kbd)$"))
2222
23−((element (start_tag (tag_name) @_tag) (text) @markup.underline.link)
23+((element (start_tag (tag_name) @_tag) (text) @markup.link.url)
2424 (#eq? @_tag "a"))
2525
2626((attribute
2727 (attribute_name) @_attr
28− (quoted_attribute_value (attribute_value) @markup.underline.link))
28+ (quoted_attribute_value (attribute_value) @markup.link.url))
2929 (#match? @_attr "^(href|src)$"))
3030
3131(tag_name) @tag
theme.toml+1−1
@@ -31,7 +31,7 @@ label = "honey"
3131"markup.heading" = "lilac"
3232"markup.bold" = { modifiers = ["bold"] }
3333"markup.italic" = { modifiers = ["italic"] }
34−"markup.underline.link" = { fg = "silver", modifiers = ["underlined"] }
34+"markup.link.url" = { fg = "silver", modifiers = ["underlined"] }
3535"markup.raw" = "almond"
3636
3737# TODO: diferentiate doc comment