mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Add a few more rust highlighting patterns
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
5d2ac3f4e4
commit
c80812c809
@ -1,4 +1,5 @@
|
||||
(type_identifier) @type
|
||||
(primitive_type) @type.builtin
|
||||
|
||||
(field_identifier) @property
|
||||
|
||||
@ -11,37 +12,50 @@
|
||||
field: (field_identifier) @function.method)
|
||||
])
|
||||
|
||||
(function_item
|
||||
name: (identifier) @function.definition)
|
||||
(function_item name: (identifier) @function.definition)
|
||||
(function_signature_item name: (identifier) @function.definition)
|
||||
|
||||
[
|
||||
"async"
|
||||
"break"
|
||||
"const"
|
||||
"continue"
|
||||
"default"
|
||||
"dyn"
|
||||
"else"
|
||||
"enum"
|
||||
"extern"
|
||||
"for"
|
||||
"fn"
|
||||
"if"
|
||||
"in"
|
||||
"impl"
|
||||
"let"
|
||||
"loop"
|
||||
"macro_rules!"
|
||||
"match"
|
||||
"mod"
|
||||
"move"
|
||||
"pub"
|
||||
"return"
|
||||
"static"
|
||||
"struct"
|
||||
"trait"
|
||||
"type"
|
||||
"use"
|
||||
"where"
|
||||
"while"
|
||||
"union"
|
||||
"unsafe"
|
||||
(mutable_specifier)
|
||||
(super)
|
||||
] @keyword
|
||||
|
||||
(string_literal) @string
|
||||
[
|
||||
(string_literal)
|
||||
(raw_string_literal)
|
||||
(char_literal)
|
||||
] @string
|
||||
|
||||
[
|
||||
(line_comment)
|
||||
|
Loading…
Reference in New Issue
Block a user