fix: improve fallbacks to closer match vscode themes

This commit is contained in:
CJ van den Berg 2024-11-05 21:03:17 +01:00
parent 78f6756494
commit 9375ffabc0
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -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" },
};