From 9375ffabc02b63b2630598a2fd81730837e87a43 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 5 Nov 2024 21:03:17 +0100 Subject: [PATCH] fix: improve fallbacks to closer match vscode themes --- src/tui/tui.zig | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/tui/tui.zig b/src/tui/tui.zig index 6ec9839..c4ff059 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -888,40 +888,45 @@ fn find_scope_fallback(scope: []const u8) ?[]const u8 { pub const FallBack = struct { ts: []const u8, tm: []const u8 }; pub const fallbacks: []const FallBack = &[_]FallBack{ .{ .ts = "namespace", .tm = "entity.name.namespace" }, - .{ .ts = "type", .tm = "entity.name.type" }, + .{ .ts = "type.builtin", .tm = "keyword.type" }, .{ .ts = "type.defaultLibrary", .tm = "support.type" }, + .{ .ts = "type", .tm = "entity.name.type" }, .{ .ts = "struct", .tm = "storage.type.struct" }, - .{ .ts = "class", .tm = "entity.name.type.class" }, .{ .ts = "class.defaultLibrary", .tm = "support.class" }, + .{ .ts = "class", .tm = "entity.name.type.class" }, .{ .ts = "interface", .tm = "entity.name.type.interface" }, .{ .ts = "enum", .tm = "entity.name.type.enum" }, + .{ .ts = "enumMember", .tm = "variable.other.enummember" }, .{ .ts = "constant", .tm = "entity.name.constant" }, - .{ .ts = "function", .tm = "entity.name.function" }, .{ .ts = "function.defaultLibrary", .tm = "support.function" }, + .{ .ts = "function.builtin", .tm = "entity.name.function" }, + .{ .ts = "function.call", .tm = "entity.name.function.function-call" }, + .{ .ts = "function", .tm = "entity.name.function" }, .{ .ts = "method", .tm = "entity.name.function.member" }, .{ .ts = "macro", .tm = "entity.name.function.macro" }, - .{ .ts = "variable", .tm = "entity.name.variable" }, - .{ .ts = "variable.readonly", .tm = "variable.other.constant" }, .{ .ts = "variable.readonly.defaultLibrary", .tm = "support.constant" }, + .{ .ts = "variable.readonly", .tm = "variable.other.constant" }, + .{ .ts = "variable.member", .tm = "property" }, + // .{ .ts = "variable.parameter", .tm = "variable" }, + // .{ .ts = "variable", .tm = "entity.name.variable" }, + .{ .ts = "label", .tm = "entity.name.label" }, .{ .ts = "parameter", .tm = "variable.parameter" }, - .{ .ts = "property", .tm = "variable.other.property" }, .{ .ts = "property.readonly", .tm = "variable.other.constant.property" }, - .{ .ts = "enumMember", .tm = "variable.other.enummember" }, + .{ .ts = "property", .tm = "variable.other.property" }, .{ .ts = "event", .tm = "variable.other.event" }, - - // zig .{ .ts = "attribute", .tm = "keyword" }, .{ .ts = "number", .tm = "constant.numeric" }, .{ .ts = "operator", .tm = "keyword.operator" }, .{ .ts = "boolean", .tm = "keyword.constant.bool" }, .{ .ts = "string", .tm = "string.quoted.double" }, .{ .ts = "character", .tm = "string.quoted.single" }, - .{ .ts = "repeat", .tm = "keyword.control.flow" }, .{ .ts = "field", .tm = "variable" }, + .{ .ts = "repeat", .tm = "keyword.control.repeat" }, .{ .ts = "keyword.conditional", .tm = "keyword.control.conditional" }, .{ .ts = "keyword.repeat", .tm = "keyword.control.repeat" }, .{ .ts = "keyword.modifier", .tm = "keyword.storage" }, .{ .ts = "keyword.type", .tm = "keyword.structure" }, + .{ .ts = "keyword.function", .tm = "storage.type.function" }, .{ .ts = "constant.builtin", .tm = "keyword.constant" }, };