Skip to content

Commit

Permalink
feat: add everforest and nord themes
Browse files Browse the repository at this point in the history
  • Loading branch information
neurocyte committed May 16, 2024
1 parent 0386d79 commit 68a95a4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
8 changes: 8 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions src/compile.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions src/theme_files.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 {
Expand Down

0 comments on commit 68a95a4

Please sign in to comment.