From c79127c1bb8566f65e168e4bd9f0f201e6358e76 Mon Sep 17 00:00:00 2001 From: arfan Date: Sun, 4 Oct 2026 21:43:37 +0700 Subject: [PATCH] theme: expand vscode syntax and semantic token colors (#3686) Add missing TextMate scopes (storage, entity namespaces/types) and semantic tokens (method, struct, interface, enum, typeParameter, enumMember, namespace), and remap roles to theme-derived hues so keywords, strings, types and methods read distinctly instead of flat white. --- .../templates/vscode-color-theme-dark.json | 55 +++++++++++++++---- .../templates/vscode-color-theme-default.json | 48 ++++++++++++---- .../templates/vscode-color-theme-light.json | 51 +++++++++++------ 3 files changed, 115 insertions(+), 39 deletions(-) diff --git a/quickshell/matugen/templates/vscode-color-theme-dark.json b/quickshell/matugen/templates/vscode-color-theme-dark.json index b2e44516a..768d8fd8c 100644 --- a/quickshell/matugen/templates/vscode-color-theme-dark.json +++ b/quickshell/matugen/templates/vscode-color-theme-dark.json @@ -205,15 +205,15 @@ } }, { - "scope": ["keyword"], + "scope": ["keyword", "storage"], "settings": { - "foreground": "{{dank16.color6.dark.hex}}" + "foreground": "{{dank16.color4.dark.hex}}" } }, { "scope": ["string"], "settings": { - "foreground": "{{dank16.color3.dark.hex}}" + "foreground": "{{dank16.color2.dark.hex}}" } }, { @@ -229,15 +229,21 @@ } }, { - "scope": ["entity.name.function"], + "scope": ["entity.name.namespace", "entity.name.type.namespace"], "settings": { - "foreground": "{{dank16.color2.dark.hex}}" + "foreground": "{{colors.on_surface.dark.hex}}" } }, { - "scope": ["entity.name.class", "support.type"], + "scope": ["entity.name.function"], "settings": { - "foreground": "{{dank16.color12.dark.hex}}" + "foreground": "{{dank16.color13.dark.hex}}" + } + }, + { + "scope": ["entity.name.class", "entity.name.type", "support.class", "support.type"], + "settings": { + "foreground": "{{dank16.color11.dark.hex}}" } }, { @@ -313,19 +319,46 @@ "foreground": "{{dank16.color7.dark.hex}}" }, "property": { - "foreground": "{{dank16.color4.dark.hex}}" + "foreground": "{{colors.secondary.dark.hex}}" }, "function": { - "foreground": "{{dank16.color2.dark.hex}}" + "foreground": "{{dank16.color13.dark.hex}}" + }, + "method": { + "foreground": "{{dank16.color13.dark.hex}}" + }, + "type": { + "foreground": "{{dank16.color11.dark.hex}}" + }, + "class": { + "foreground": "{{dank16.color11.dark.hex}}" + }, + "struct": { + "foreground": "{{dank16.color11.dark.hex}}" + }, + "interface": { + "foreground": "{{dank16.color11.dark.hex}}" + }, + "enum": { + "foreground": "{{dank16.color11.dark.hex}}" + }, + "typeParameter": { + "foreground": "{{dank16.color11.dark.hex}}" + }, + "enumMember": { + "foreground": "{{dank16.color13.dark.hex}}" + }, + "namespace": { + "foreground": "{{colors.on_surface.dark.hex}}" }, "string": { - "foreground": "{{dank16.color3.dark.hex}}" + "foreground": "{{dank16.color2.dark.hex}}" }, "number": { "foreground": "{{dank16.color12.dark.hex}}" }, "keyword": { - "foreground": "{{dank16.color6.dark.hex}}" + "foreground": "{{dank16.color4.dark.hex}}" }, "comment": { "foreground": "{{dank16.color8.dark.hex}}" diff --git a/quickshell/matugen/templates/vscode-color-theme-default.json b/quickshell/matugen/templates/vscode-color-theme-default.json index 78b45c6a4..72d356a56 100644 --- a/quickshell/matugen/templates/vscode-color-theme-default.json +++ b/quickshell/matugen/templates/vscode-color-theme-default.json @@ -151,9 +151,9 @@ } }, { - "scope": ["keyword"], + "scope": ["keyword", "storage"], "settings": { - "foreground": "{{dank16.color6.default.hex}}" + "foreground": "{{dank16.color4.default.hex}}" } }, { @@ -175,15 +175,21 @@ } }, { - "scope": ["entity.name.function"], + "scope": ["entity.name.namespace", "entity.name.type.namespace"], "settings": { - "foreground": "{{dank16.color4.default.hex}}" + "foreground": "{{colors.on_surface.default.hex}}" } }, { - "scope": ["entity.name.class", "support.type"], + "scope": ["entity.name.function"], "settings": { - "foreground": "{{colors.secondary.default.hex}}" + "foreground": "{{dank16.color13.default.hex}}" + } + }, + { + "scope": ["entity.name.class", "entity.name.type", "support.class", "support.type"], + "settings": { + "foreground": "{{dank16.color11.default.hex}}" } }, { @@ -256,19 +262,37 @@ "foreground": "{{colors.on_surface.default.hex}}" }, "property": { - "foreground": "{{dank16.color4.default.hex}}" + "foreground": "{{colors.secondary.default.hex}}" }, "function": { - "foreground": "{{dank16.color4.default.hex}}" + "foreground": "{{dank16.color13.default.hex}}" }, "method": { - "foreground": "{{dank16.color4.default.hex}}" + "foreground": "{{dank16.color13.default.hex}}" }, "type": { - "foreground": "{{colors.secondary.default.hex}}" + "foreground": "{{dank16.color11.default.hex}}" }, "class": { - "foreground": "{{colors.secondary.default.hex}}" + "foreground": "{{dank16.color11.default.hex}}" + }, + "struct": { + "foreground": "{{dank16.color11.default.hex}}" + }, + "interface": { + "foreground": "{{dank16.color11.default.hex}}" + }, + "enum": { + "foreground": "{{dank16.color11.default.hex}}" + }, + "typeParameter": { + "foreground": "{{dank16.color11.default.hex}}" + }, + "enumMember": { + "foreground": "{{dank16.color13.default.hex}}" + }, + "namespace": { + "foreground": "{{colors.on_surface.default.hex}}" }, "string": { "foreground": "{{dank16.color2.default.hex}}" @@ -277,7 +301,7 @@ "foreground": "{{dank16.color12.default.hex}}" }, "keyword": { - "foreground": "{{dank16.color6.default.hex}}" + "foreground": "{{dank16.color4.default.hex}}" }, "comment": { "foreground": "{{colors.outline.default.hex}}" diff --git a/quickshell/matugen/templates/vscode-color-theme-light.json b/quickshell/matugen/templates/vscode-color-theme-light.json index 8d239807e..4924c05e3 100644 --- a/quickshell/matugen/templates/vscode-color-theme-light.json +++ b/quickshell/matugen/templates/vscode-color-theme-light.json @@ -193,7 +193,7 @@ "storage.type" ], "settings": { - "foreground": "{{dank16.color6.light.hex}}" + "foreground": "{{dank16.color4.light.hex}}" } }, { @@ -215,7 +215,7 @@ "constant.character" ], "settings": { - "foreground": "{{dank16.color1.light.hex}}" + "foreground": "{{dank16.color12.light.hex}}" } }, { @@ -286,6 +286,16 @@ "foreground": "{{dank16.color1.light.hex}}" } }, + { + "name": "Namespaces", + "scope": [ + "entity.name.namespace", + "entity.name.type.namespace" + ], + "settings": { + "foreground": "{{colors.on_surface.light.hex}}" + } + }, { "name": "Functions", "scope": [ @@ -293,7 +303,7 @@ "support.function" ], "settings": { - "foreground": "{{dank16.color4.light.hex}}" + "foreground": "{{dank16.color13.light.hex}}" } }, { @@ -304,7 +314,7 @@ "support.type" ], "settings": { - "foreground": "{{colors.secondary.light.hex}}" + "foreground": "{{dank16.color11.light.hex}}" } }, { @@ -417,43 +427,52 @@ "foreground": "{{colors.on_surface.light.hex}}" }, "property": { - "foreground": "{{dank16.color4.light.hex}}" + "foreground": "{{colors.secondary.light.hex}}" }, "function": { - "foreground": "{{dank16.color4.light.hex}}" + "foreground": "{{dank16.color13.light.hex}}" }, "method": { - "foreground": "{{dank16.color4.light.hex}}" + "foreground": "{{dank16.color13.light.hex}}" }, "type": { - "foreground": "{{colors.secondary.light.hex}}" + "foreground": "{{dank16.color11.light.hex}}" }, "class": { - "foreground": "{{colors.secondary.light.hex}}" + "foreground": "{{dank16.color11.light.hex}}" + }, + "struct": { + "foreground": "{{dank16.color11.light.hex}}" + }, + "interface": { + "foreground": "{{dank16.color11.light.hex}}" + }, + "enum": { + "foreground": "{{dank16.color11.light.hex}}" }, "typeParameter": { - "foreground": "{{colors.tertiary.light.hex}}" + "foreground": "{{dank16.color11.light.hex}}" }, "enumMember": { - "foreground": "{{dank16.color1.light.hex}}" + "foreground": "{{dank16.color13.light.hex}}" + }, + "namespace": { + "foreground": "{{colors.on_surface.light.hex}}" }, "string": { "foreground": "{{dank16.color2.light.hex}}" }, "number": { - "foreground": "{{dank16.color1.light.hex}}" + "foreground": "{{dank16.color12.light.hex}}" }, "comment": { "foreground": "{{colors.outline.light.hex}}" }, "keyword": { - "foreground": "{{dank16.color6.light.hex}}" + "foreground": "{{dank16.color4.light.hex}}" }, "operator": { "foreground": "{{colors.on_surface.light.hex}}" - }, - "namespace": { - "foreground": "{{colors.on_surface.light.hex}}" } } }