ZIm/zed/languages/rust/highlights.scm
Max Brunsfeld 8340958b33 Convert query capture indices to style ids
* Introduce a Theme struct as a new part of the app's settings
* Store on each Language a ThemeMap, which converts the capture ids
  from that language's highlight query into StyleIds, which identify
  styles in the current Theme.
* Update `highlighted_chunks` methods to provide StyleIds instead of
  capture ids.
2021-05-24 16:44:14 -07:00

49 lines
618 B
Scheme

(type_identifier) @type
(call_expression
function: [
(identifier) @function
(scoped_identifier
name: (identifier) @function)
(field_expression
field: (field_identifier) @function.method)
])
(field_identifier) @property
(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