From dbf337af36473da6f00c3d47229bff8c7b4754ef Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Tue, 22 Mar 2022 10:26:31 +0000 Subject: [PATCH] some style changes --- defaults/dark-theme.toml | 5 +++++ defaults/light-theme.toml | 3 +++ lapce-core/src/style.rs | 10 +++------- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/defaults/dark-theme.toml b/defaults/dark-theme.toml index 6bd522fa..9d5fb0dc 100644 --- a/defaults/dark-theme.toml +++ b/defaults/dark-theme.toml @@ -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" diff --git a/defaults/light-theme.toml b/defaults/light-theme.toml index 272a0471..bcdb8be7 100644 --- a/defaults/light-theme.toml +++ b/defaults/light-theme.toml @@ -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" diff --git a/lapce-core/src/style.rs b/lapce-core/src/style.rs index fd415ef5..e55114ad 100644 --- a/lapce-core/src/style.rs +++ b/lapce-core/src/style.rs @@ -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]) { 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('.'));