diff --git a/editors/code/src/color_theme.ts b/editors/code/src/color_theme.ts index a6957a76ef3..2f2a39877e9 100644 --- a/editors/code/src/color_theme.ts +++ b/editors/code/src/color_theme.ts @@ -83,8 +83,12 @@ function loadThemeNamed(themeName: string): ColorTheme { res.mergeFrom(loadThemeFile(themePath)); } - const customizations: any = vscode.workspace.getConfiguration('editor').get('tokenColorCustomizations'); - res.mergeFrom(ColorTheme.fromRules(customizations?.textMateRules ?? [])); + const global_customizations: any = vscode.workspace.getConfiguration('editor').get('tokenColorCustomizations'); + res.mergeFrom(ColorTheme.fromRules(global_customizations?.textMateRules ?? [])); + + const theme_customizations: any = vscode.workspace.getConfiguration('editor.tokenColorCustomizations').get(`[${themeName}]`); + res.mergeFrom(ColorTheme.fromRules(theme_customizations?.textMateRules ?? [])); + return res; } diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts index c4d286aefe4..b34e49c173a 100644 --- a/editors/code/src/highlighting.ts +++ b/editors/code/src/highlighting.ts @@ -233,16 +233,16 @@ const TAG_TO_SCOPES = new Map([ ["type", ["entity.name.type"]], ["type.builtin", ["entity.name.type", "support.type.primitive"]], ["type.self", ["entity.name.type.parameter.self"]], - ["type.param", ["entity.name.type.parameter"]], - ["type.lifetime", ["entity.name.type.lifetime"]], + ["type.param", ["entity.name.type.parameter", "entity.name.type.param.rust"]], + ["type.lifetime", ["entity.name.type.lifetime", "entity.name.lifetime.rust"]], ["literal.byte", ["constant.character.byte"]], - ["literal.char", ["constant.character"]], + ["literal.char", ["constant.character.rust"]], ["literal.numeric", ["constant.numeric"]], ["comment", ["comment"]], ["string", ["string.quoted"]], - ["attribute", ["meta.attribute"]], + ["attribute", ["meta.attribute.rust"]], ["keyword", ["keyword"]], ["keyword.unsafe", ["keyword.other.unsafe"]],