mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 21:32:40 +00:00
Add missing rust highlights
This commit is contained in:
parent
d48380bc48
commit
345b266dee
1 changed files with 19 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
(primitive_type) @type.builtin
|
(primitive_type) @type.builtin
|
||||||
|
(self) @variable.builtin
|
||||||
(field_identifier) @property
|
(field_identifier) @property
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
|
@ -15,6 +15,16 @@
|
||||||
(function_item name: (identifier) @function.definition)
|
(function_item name: (identifier) @function.definition)
|
||||||
(function_signature_item name: (identifier) @function.definition)
|
(function_signature_item name: (identifier) @function.definition)
|
||||||
|
|
||||||
|
(macro_invocation
|
||||||
|
macro: [
|
||||||
|
(identifier) @function.special
|
||||||
|
(scoped_identifier
|
||||||
|
name: (identifier) @function.special)
|
||||||
|
])
|
||||||
|
|
||||||
|
(macro_definition
|
||||||
|
name: (identifier) @function.special.definition)
|
||||||
|
|
||||||
; Identifier conventions
|
; Identifier conventions
|
||||||
|
|
||||||
; Assume uppercase names are enum constructors
|
; Assume uppercase names are enum constructors
|
||||||
|
@ -71,6 +81,7 @@
|
||||||
"mod"
|
"mod"
|
||||||
"move"
|
"move"
|
||||||
"pub"
|
"pub"
|
||||||
|
"ref"
|
||||||
"return"
|
"return"
|
||||||
"static"
|
"static"
|
||||||
"struct"
|
"struct"
|
||||||
|
@ -91,6 +102,13 @@
|
||||||
(char_literal)
|
(char_literal)
|
||||||
] @string
|
] @string
|
||||||
|
|
||||||
|
[
|
||||||
|
(integer_literal)
|
||||||
|
(float_literal)
|
||||||
|
] @number
|
||||||
|
|
||||||
|
(boolean_literal) @constant
|
||||||
|
|
||||||
[
|
[
|
||||||
(line_comment)
|
(line_comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
|
|
Loading…
Reference in a new issue