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.
This commit is contained in:
@@ -1,6 +1,49 @@
|
||||
(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
|
||||
] @keyword
|
||||
|
||||
(string_literal) @string
|
||||
|
||||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment
|
||||
|
||||
Reference in New Issue
Block a user