summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gen_themes.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/gen_themes.zig b/tools/gen_themes.zig
index 4f3946ad..b9a9adb0 100644
--- a/tools/gen_themes.zig
+++ b/tools/gen_themes.zig
@@ -72,6 +72,10 @@ const Theme = struct {
lineno: Rgb,
scroll_track: Rgb,
scroll_thumb: Rgb,
+ /// A message's error ink (colors.Roles.err): diagnostic.error's, else
+ /// error's, else the theme's red (UX E3: neonotte's diagnostic.error is
+ /// an underline only).
+ diagnostic_error: ?Rgb = null,
palette: ?[16]Rgb,
};
@@ -361,6 +365,7 @@ fn helixTheme(arena: std.mem.Allocator, stem: []const u8, h: Helix) !Theme {
// anything else in the theme's greys) for the thumb riding it
.scroll_track = h.get("ui.statusline", .bg) orelse page,
.scroll_thumb = sel,
+ .diagnostic_error = h.first(&.{ .{ "diagnostic.error", .fg }, .{ "error", .fg } }) orelse h.color("red"),
.palette = null,
};
}
@@ -575,6 +580,8 @@ fn readZed(arena: std.mem.Allocator, gpa: std.mem.Allocator, path: []const u8, t
.lineno = z.need("editor.line_number"),
.scroll_track = z.need("scrollbar.thumb.border"),
.scroll_thumb = z.need("scrollbar.thumb.background"),
+ // its status colour, else the palette's red (colors.zig)
+ .diagnostic_error = if (z.style.get("error") != null) z.need("error") else null,
.palette = pal,
});
}