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).
This commit is contained in:
parent
8208d22601
commit
7c01d92653
5 changed files with 12 additions and 9 deletions
|
@ -105,6 +105,7 @@ We use a similar set of scopes as
|
||||||
|
|
||||||
- `type` - Types
|
- `type` - Types
|
||||||
- `builtin` - Primitive types provided by the language (`int`, `usize`)
|
- `builtin` - Primitive types provided by the language (`int`, `usize`)
|
||||||
|
- `constructor`
|
||||||
|
|
||||||
- `constant` (TODO: constant.other.placeholder for %v)
|
- `constant` (TODO: constant.other.placeholder for %v)
|
||||||
- `builtin` Special constants provided by the language (`true`, `false`, `nil` etc)
|
- `builtin` Special constants provided by the language (`true`, `false`, `nil` etc)
|
||||||
|
@ -169,8 +170,9 @@ We use a similar set of scopes as
|
||||||
- `numbered`
|
- `numbered`
|
||||||
- `bold`
|
- `bold`
|
||||||
- `italic`
|
- `italic`
|
||||||
- `underline`
|
|
||||||
- `link`
|
- `link`
|
||||||
|
- `url`
|
||||||
|
- `label`
|
||||||
- `quote`
|
- `quote`
|
||||||
- `raw`
|
- `raw`
|
||||||
- `inline`
|
- `inline`
|
||||||
|
|
|
@ -371,7 +371,7 @@
|
||||||
((generic_command
|
((generic_command
|
||||||
name:(generic_command_name) @_name
|
name:(generic_command_name) @_name
|
||||||
.
|
.
|
||||||
arg: (_) @markup.underline.link)
|
arg: (_) @markup.link.url)
|
||||||
(#match? @_name "^(\\\\url|\\\\href)$"))
|
(#match? @_name "^(\\\\url|\\\\href)$"))
|
||||||
|
|
||||||
(ERROR) @error
|
(ERROR) @error
|
||||||
|
|
|
@ -10,15 +10,16 @@
|
||||||
(fenced_code_block)
|
(fenced_code_block)
|
||||||
] @markup.raw.block
|
] @markup.raw.block
|
||||||
|
|
||||||
|
(block_quote) @markup.quote
|
||||||
|
|
||||||
(code_span) @markup.raw.inline
|
(code_span) @markup.raw.inline
|
||||||
|
|
||||||
(emphasis) @markup.italic
|
(emphasis) @markup.italic
|
||||||
|
|
||||||
(strong_emphasis) @markup.bold
|
(strong_emphasis) @markup.bold
|
||||||
|
|
||||||
(link_destination) @markup.underline.link
|
(link_destination) @markup.link.url
|
||||||
|
(link_label) @markup.link.label
|
||||||
; (link_label) @markup.label ; TODO: rename
|
|
||||||
|
|
||||||
[
|
[
|
||||||
(list_marker_plus)
|
(list_marker_plus)
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
((element (start_tag (tag_name) @_tag) (text) @markup.inline)
|
((element (start_tag (tag_name) @_tag) (text) @markup.inline)
|
||||||
(#match? @_tag "^(code|kbd)$"))
|
(#match? @_tag "^(code|kbd)$"))
|
||||||
|
|
||||||
((element (start_tag (tag_name) @_tag) (text) @markup.underline.link)
|
((element (start_tag (tag_name) @_tag) (text) @markup.link.url)
|
||||||
(#eq? @_tag "a"))
|
(#eq? @_tag "a"))
|
||||||
|
|
||||||
((attribute
|
((attribute
|
||||||
(attribute_name) @_attr
|
(attribute_name) @_attr
|
||||||
(quoted_attribute_value (attribute_value) @markup.underline.link))
|
(quoted_attribute_value (attribute_value) @markup.link.url))
|
||||||
(#match? @_attr "^(href|src)$"))
|
(#match? @_attr "^(href|src)$"))
|
||||||
|
|
||||||
(tag_name) @tag
|
(tag_name) @tag
|
||||||
|
|
|
@ -31,7 +31,7 @@ label = "honey"
|
||||||
"markup.heading" = "lilac"
|
"markup.heading" = "lilac"
|
||||||
"markup.bold" = { modifiers = ["bold"] }
|
"markup.bold" = { modifiers = ["bold"] }
|
||||||
"markup.italic" = { modifiers = ["italic"] }
|
"markup.italic" = { modifiers = ["italic"] }
|
||||||
"markup.underline.link" = { fg = "silver", modifiers = ["underlined"] }
|
"markup.link.url" = { fg = "silver", modifiers = ["underlined"] }
|
||||||
"markup.raw" = "almond"
|
"markup.raw" = "almond"
|
||||||
|
|
||||||
# TODO: diferentiate doc comment
|
# TODO: diferentiate doc comment
|
||||||
|
|
Loading…
Reference in a new issue