some style changes

This commit is contained in:
Dongdong Zhou 2022-03-22 10:26:31 +00:00
parent 49c44354bb
commit dbf337af36
3 changed files with 11 additions and 7 deletions

View File

@ -66,11 +66,14 @@ magenta = "#C678DD"
"style.constant" = "$yellow"
"style.type" = "$yellow"
"style.typeAlias" = "$yellow"
"style.number" = "$yellow"
"style.enum" = "$yellow"
"style.struct" = "$yellow"
"style.structure" = "$yellow"
"style.interface" = "$yellow"
"style.attribute" = "$yellow"
"style.constructor" = "$yellow"
"style.function" = "$blue"
"style.method" = "$blue"
@ -89,3 +92,5 @@ magenta = "#C678DD"
"style.type.builtin" = "$cyan"
"style.builtinType" = "$cyan"
"style.escape" = "$cyan"
"style.embedded" = "$cyan"

View File

@ -72,6 +72,7 @@ magenta = "#A626A4"
"style.structure" = "$yellow"
"style.interface" = "$yellow"
"style.attribute" = "$yellow"
"style.constructor" = "$yellow"
"style.function" = "$blue"
"style.method" = "$blue"
@ -90,3 +91,5 @@ magenta = "#A626A4"
"style.type.builtin" = "$cyan"
"style.builtinType" = "$cyan"
"style.escape" = "$cyan"
"style.embedded" = "$cyan"

View File

@ -20,26 +20,21 @@
const BUFFER_LINES_RESERVE_CAPACITY: usize = 1000;
pub const SCOPES: &[&str] = &[
"constant",
"constant.builtin",
"type",
"type.builtin",
"property",
"comment",
"constructor",
"function",
"function.method",
"function.macro",
"punctuation.bracket",
"punctuation.delimiter",
"label",
"keyword",
"string",
"variable.parameter",
"variable.builtin",
"variable",
"variable.other.member",
"operator",
"attribute",
"escape",
"embedded",
];
/// Indicates which highlight should be applied to a region of source code.
@ -351,6 +346,7 @@ fn configure(&mut self, recognized_names: &[impl AsRef<str>]) {
self.highlight_indices.clear();
self.highlight_indices
.extend(self.query.capture_names().iter().map(move |capture_name| {
println!("{capture_name}");
capture_parts.clear();
capture_parts.extend(capture_name.split('.'));