Add a few more rust highlighting patterns

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2021-05-25 17:42:46 -07:00
parent 5d2ac3f4e4
commit c80812c809

View File

@ -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)