aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/code/src/color_theme.ts8
-rw-r--r--editors/code/src/highlighting.ts8
2 files changed, 10 insertions, 6 deletions
diff --git a/editors/code/src/color_theme.ts b/editors/code/src/color_theme.ts
index a6957a76e..2f2a39877 100644
--- a/editors/code/src/color_theme.ts
+++ b/editors/code/src/color_theme.ts
@@ -83,8 +83,12 @@ function loadThemeNamed(themeName: string): ColorTheme {
83 res.mergeFrom(loadThemeFile(themePath)); 83 res.mergeFrom(loadThemeFile(themePath));
84 } 84 }
85 85
86 const customizations: any = vscode.workspace.getConfiguration('editor').get('tokenColorCustomizations'); 86 const global_customizations: any = vscode.workspace.getConfiguration('editor').get('tokenColorCustomizations');
87 res.mergeFrom(ColorTheme.fromRules(customizations?.textMateRules ?? [])); 87 res.mergeFrom(ColorTheme.fromRules(global_customizations?.textMateRules ?? []));
88
89 const theme_customizations: any = vscode.workspace.getConfiguration('editor.tokenColorCustomizations').get(`[${themeName}]`);
90 res.mergeFrom(ColorTheme.fromRules(theme_customizations?.textMateRules ?? []));
91
88 92
89 return res; 93 return res;
90} 94}
diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts
index c4d286aef..b34e49c17 100644
--- a/editors/code/src/highlighting.ts
+++ b/editors/code/src/highlighting.ts
@@ -233,16 +233,16 @@ const TAG_TO_SCOPES = new Map<string, string[]>([
233 ["type", ["entity.name.type"]], 233 ["type", ["entity.name.type"]],
234 ["type.builtin", ["entity.name.type", "support.type.primitive"]], 234 ["type.builtin", ["entity.name.type", "support.type.primitive"]],
235 ["type.self", ["entity.name.type.parameter.self"]], 235 ["type.self", ["entity.name.type.parameter.self"]],
236 ["type.param", ["entity.name.type.parameter"]], 236 ["type.param", ["entity.name.type.parameter", "entity.name.type.param.rust"]],
237 ["type.lifetime", ["entity.name.type.lifetime"]], 237 ["type.lifetime", ["entity.name.type.lifetime", "entity.name.lifetime.rust"]],
238 238
239 ["literal.byte", ["constant.character.byte"]], 239 ["literal.byte", ["constant.character.byte"]],
240 ["literal.char", ["constant.character"]], 240 ["literal.char", ["constant.character.rust"]],
241 ["literal.numeric", ["constant.numeric"]], 241 ["literal.numeric", ["constant.numeric"]],
242 242
243 ["comment", ["comment"]], 243 ["comment", ["comment"]],
244 ["string", ["string.quoted"]], 244 ["string", ["string.quoted"]],
245 ["attribute", ["meta.attribute"]], 245 ["attribute", ["meta.attribute.rust"]],
246 246
247 ["keyword", ["keyword"]], 247 ["keyword", ["keyword"]],
248 ["keyword.unsafe", ["keyword.other.unsafe"]], 248 ["keyword.unsafe", ["keyword.other.unsafe"]],