From 68a95a4984088ec8480252af93f3069f25f21b66 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 16 May 2024 22:30:35 +0200 Subject: [PATCH] feat: add everforest and nord themes --- build.zig | 3 +++ build.zig.zon | 8 ++++++++ src/compile.zig | 5 +++++ src/theme_files.zig | 3 +++ 4 files changed, 19 insertions(+) diff --git a/build.zig b/build.zig index 26d45ca..58a1c0b 100644 --- a/build.zig +++ b/build.zig @@ -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"); } diff --git a/build.zig.zon b/build.zig.zon index 0549cf0..8a81efa 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -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", diff --git a/src/compile.zig b/src/compile.zig index 7ad7693..a406e85 100644 --- a/src/compile.zig +++ b/src/compile.zig @@ -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 { diff --git a/src/theme_files.zig b/src/theme_files.zig index 8b864d2..2178148 100644 --- a/src/theme_files.zig +++ b/src/theme_files.zig @@ -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 {