feat: add ayu themes

This commit is contained in:
CJ van den Berg 2024-02-19 10:20:06 +01:00
parent ab24c12c24
commit 42399273a9
4 changed files with 19 additions and 0 deletions

View file

@ -60,4 +60,10 @@ fn add_themes(b: *std.Build, exe: anytype) void {
theme_file(b, exe, "tokyo_night", "themes/tokyo-night-storm-color-theme.json"); theme_file(b, exe, "tokyo_night", "themes/tokyo-night-storm-color-theme.json");
theme_file(b, exe, "tokyo_night", "themes/tokyo-night-color-theme.json"); theme_file(b, exe, "tokyo_night", "themes/tokyo-night-color-theme.json");
theme_file(b, exe, "tokyo_night", "themes/tokyo-night-light-color-theme.json"); theme_file(b, exe, "tokyo_night", "themes/tokyo-night-light-color-theme.json");
theme_file(b, exe, "ayu", "ayu-dark.json");
theme_file(b, exe, "ayu", "ayu-dark-bordered.json");
theme_file(b, exe, "ayu", "ayu-mirage.json");
theme_file(b, exe, "ayu", "ayu-mirage-bordered.json");
theme_file(b, exe, "ayu", "ayu-light.json");
theme_file(b, exe, "ayu", "ayu-light-bordered.json");
} }

View file

@ -37,6 +37,10 @@
.url = "https://github.com/enkia/tokyo-night-vscode-theme/archive/55336bd57924021c174470d9f476a1db01eddb97.tar.gz", .url = "https://github.com/enkia/tokyo-night-vscode-theme/archive/55336bd57924021c174470d9f476a1db01eddb97.tar.gz",
.hash = "1220f9729cd271c29dee0e199b2bc0f801cb657b603668680a07191b9a8c1b1f21fb", .hash = "1220f9729cd271c29dee0e199b2bc0f801cb657b603668680a07191b9a8c1b1f21fb",
}, },
.theme_ayu = .{
.url = "https://github.com/ayu-theme/vscode-ayu/archive/91839e8a9dfa78d61e58dbcf9b52272a01fee66a.tar.gz",
.hash = "1220217a9a25d48cd61948f3455d08d4f64ed2c72e79f3257a9f28c746eb1432af27",
},
}, },
.paths = .{ .paths = .{
"build.zig", "build.zig",

View file

@ -184,6 +184,8 @@ fn load_token_settings_object(file_name: []const u8, scopes_name: ?[]const u8, c
style.fs = .italic; style.fs = .italic;
} else if (eql(u8, "strikethrough", value)) { } else if (eql(u8, "strikethrough", value)) {
style.fs = .strikethrough; style.fs = .strikethrough;
} else if (eql(u8, "normal", value)) {
style.fs = .normal;
} else if (eql(u8, "", value)) { } else if (eql(u8, "", value)) {
style.fs = .normal; style.fs = .normal;
} else { } else {

View file

@ -36,8 +36,15 @@ pub const theme_files = [_]theme_file{
THEME("themes/tokyo-night-storm-color-theme.json"), THEME("themes/tokyo-night-storm-color-theme.json"),
THEME("themes/tokyo-night-color-theme.json"), THEME("themes/tokyo-night-color-theme.json"),
THEME("themes/tokyo-night-light-color-theme.json"), THEME("themes/tokyo-night-light-color-theme.json"),
THEME("ayu-dark.json"),
THEME("ayu-dark-bordered.json"),
THEME("ayu-mirage.json"),
THEME("ayu-mirage-bordered.json"),
THEME("ayu-light.json"),
THEME("ayu-light-bordered.json"),
}; };
fn THEME(comptime file_path: []const u8) theme_file { fn THEME(comptime file_path: []const u8) theme_file {
@setEvalBranchQuota(2000);
return .{ .file_name = std.fs.path.basename(file_path), .json = @embedFile(file_path) }; return .{ .file_name = std.fs.path.basename(file_path), .json = @embedFile(file_path) };
} }