feat: add everforest and nord themes

This commit is contained in:
CJ van den Berg 2024-05-16 22:30:35 +02:00
parent 0386d791da
commit 68a95a4984
4 changed files with 19 additions and 0 deletions

View file

@ -74,4 +74,7 @@ fn add_themes(b: *std.Build, exe: anytype) void {
theme_file(b, exe, "rose_pine", "themes/rose-pine-dawn-color-theme.json");
theme_file(b, exe, "adwaita", "themes/adwaita-dark.json");
theme_file(b, exe, "adwaita", "themes/adwaita-light.json");
theme_file(b, exe, "everforest", "themes/everforest-dark.json");
theme_file(b, exe, "everforest", "themes/everforest-light.json");
theme_file(b, exe, "nord", "themes/nord-color-theme.json");
}

View file

@ -53,6 +53,14 @@
.url = "https://github.com/piousdeer/vscode-adwaita/archive/5de82debcb101e5796b478e55dd382bd64be64f7.tar.gz",
.hash = "1220c6227c698f27a09c20706a8c785c4123a943e3b953c1f50457496f54e725d55b",
},
.theme_everforest = .{
.url = "https://github.com/sainnhe/everforest-vscode/archive/1e6e97e2ef074993f6e0ff6f2d67514431f22067.tar.gz",
.hash = "1220419a333850cf5fee8f6b65a8f10b299a37706154840ee7dc112f6a970db56542",
},
.theme_nord = .{
.url = "https://github.com/nordtheme/visual-studio-code/archive/8ead09822c02d0d49d0f764104505e5a34d3689f.tar.gz",
.hash = "12200a932586d96e15f5c325b4e671cf18257a0c125e3c5c46cdd18b201e454bf90f",
},
},
.paths = .{
"build.zig",

View file

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

View file

@ -39,6 +39,8 @@ pub const theme_files = [_]theme_file{
THEME("themes/rose-pine-moon-color-theme.json"),
THEME("themes/rose-pine-moon-no-italics-color-theme.json"),
THEME("themes/adwaita-dark.json"),
THEME("themes/everforest-dark.json"),
THEME("themes/nord-color-theme.json"),
// light themes
@ -56,6 +58,7 @@ pub const theme_files = [_]theme_file{
THEME("ayu-light-bordered.json"),
THEME("themes/rose-pine-dawn-color-theme.json"),
THEME("themes/adwaita-light.json"),
THEME("themes/everforest-light.json"),
};
fn THEME(comptime file_path: []const u8) theme_file {