Improve Rust highlight queries (#16747)

Release Notes:

- Add `@variable.parameter` highlight scope

![parameters are colored
pink](https://github.com/user-attachments/assets/68920017-b191-4779-9aa6-856831938480)

- Add `@attribute` highlight scope

![attributes are colored
yellow](https://github.com/user-attachments/assets/558d6ce0-5e4c-4ecb-893c-bc8f88d63829)

- Add markdown injection inside `doc_comment`s

![markdown
highlighting](https://github.com/user-attachments/assets/93ef4cf6-5ac1-46c6-80d0-82ca7bee0447)
This commit is contained in:
everdrone 2024-08-29 07:08:23 +02:00 committed by GitHub
parent eb0b6d57e3
commit bf6767bc81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -184,3 +184,8 @@
] @operator
(lifetime) @lifetime
(parameter (identifier) @variable.parameter)
(attribute_item) @attribute
(inner_attribute_item) @attribute

View file

@ -5,3 +5,11 @@
(macro_rule
(token_tree) @content
(#set! "language" "rust"))
(block_comment
(doc_comment) @content
(#set! "language" "markdown"))
(line_comment
(doc_comment) @content
(#set! "language" "markdown"))