ZIm/zed/languages/rust/highlights.scm
Max Brunsfeld 5d2ac3f4e4 Use new Tree-sitter captures API
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-05-25 16:02:43 -07:00

49 lines
618 B
Scheme

(type_identifier) @type
(field_identifier) @property
(call_expression
function: [
(identifier) @function
(scoped_identifier
name: (identifier) @function)
(field_expression
field: (field_identifier) @function.method)
])
(function_item
name: (identifier) @function.definition)
[
"async"
"break"
"const"
"continue"
"dyn"
"else"
"enum"
"for"
"fn"
"if"
"impl"
"let"
"loop"
"match"
"mod"
"move"
"pub"
"return"
"struct"
"trait"
"type"
"use"
"where"
"while"
] @keyword
(string_literal) @string
[
(line_comment)
(block_comment)
] @comment