mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
feat: improved highlight + injections, cc @stsewd
This commit is contained in:
parent
46463fe53a
commit
17a74e2055
2 changed files with 31 additions and 0 deletions
|
|
@ -4,6 +4,32 @@
|
||||||
(quoted_attribute_value) @string
|
(quoted_attribute_value) @string
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
|
||||||
|
((element (start_tag (tag_name) @_tag) (text) @text.title)
|
||||||
|
(#match? @_tag "^(h[0-9]|title)$"))
|
||||||
|
|
||||||
|
((element (start_tag (tag_name) @_tag) (text) @text.strong)
|
||||||
|
(#match? @_tag "^(strong|b)$"))
|
||||||
|
|
||||||
|
((element (start_tag (tag_name) @_tag) (text) @text.emphasis)
|
||||||
|
(#match? @_tag "^(em|i)$"))
|
||||||
|
|
||||||
|
((element (start_tag (tag_name) @_tag) (text) @text.strike)
|
||||||
|
(#match? @_tag "^(s|del)$"))
|
||||||
|
|
||||||
|
((element (start_tag (tag_name) @_tag) (text) @text.underline)
|
||||||
|
(#match? @_tag "^u$"))
|
||||||
|
|
||||||
|
((element (start_tag (tag_name) @_tag) (text) @text.literal)
|
||||||
|
(#match? @_tag "^(code|kbd)$"))
|
||||||
|
|
||||||
|
((element (start_tag (tag_name) @_tag) (text) @text.uri)
|
||||||
|
(#match? @_tag "^a$"))
|
||||||
|
|
||||||
|
((attribute
|
||||||
|
(attribute_name) @_attr
|
||||||
|
(quoted_attribute_value (attribute_value) @text.uri))
|
||||||
|
(#match? @_attr "^href$"))
|
||||||
|
|
||||||
[
|
[
|
||||||
(special_block_keyword)
|
(special_block_keyword)
|
||||||
(then)
|
(then)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
((style_element
|
((style_element
|
||||||
(raw_text) @css))
|
(raw_text) @css))
|
||||||
|
|
||||||
|
((attribute
|
||||||
|
(attribute_name) @_attr
|
||||||
|
(quoted_attribute_value (attribute_value) @css))
|
||||||
|
(#match? @_attr "^style$"))
|
||||||
|
|
||||||
((script_element
|
((script_element
|
||||||
(raw_text) @javascript))
|
(raw_text) @javascript))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue