~jamii/focus

d013411b39dccfe5b37935ab0edb89cb7764e2e6 — Jamie Brandon 23 days ago 1c0d8fd master
Highlight zig control flow
2 files changed, 15 insertions(+), 3 deletions(-)

M lib/focus/language.zig
M lib/focus/style.zig
M lib/focus/language.zig => lib/focus/language.zig +11 -1
@@ 61,7 61,17 @@ pub const Language = enum {
                        .keyword_try, .keyword_catch => std.mem.set(
                            Color,
                            colors[token.loc.start..token.loc.end],
                            style.emphasisColor,
                            style.emphasisRed,
                        ),
                        .keyword_defer, .keyword_errdefer => std.mem.set(
                            Color,
                            colors[token.loc.start..token.loc.end],
                            style.emphasisOrange,
                        ),
                        .keyword_break, .keyword_continue, .keyword_return => std.mem.set(
                            Color,
                            colors[token.loc.start..token.loc.end],
                            style.emphasisGreen,
                        ),
                        else => std.mem.set(
                            Color,

M lib/focus/style.zig => lib/focus/style.zig +4 -2
@@ 9,7 9,7 @@ pub const highlight_color = Color.hsla(0, 0.0, 0.9, 0.3);
pub const keyword_color = text_color;
pub const comment_color = Color.hsla(0, 0.0, 0.6, 1.0);
pub const error_text_color = Color.hsla(0, 1.0, 0.5, 1.0);
pub const eval_text_color = Color.hsla(180, 1.0, 0.5, 1.0);
pub const eval_text_color = Color.hsla(120, 1.0, 0.5, 1.0);
pub const multi_cursor_color = Color.hsla(150, 1.0, 0.5, 1.0);
pub const paren_match_color = Color.hsla(150, 1.0, 0.5, 0.3);



@@ 23,4 23,6 @@ pub fn identColor(ident: []const u8) Color {
    );
}

pub const emphasisColor = Color.hsla(0, 1.0, 0.5, 1.0);
pub const emphasisRed = Color.hsla(0, 1.0, 0.5, 1.0);
pub const emphasisOrange = Color.hsla(30, 1.0, 0.5, 1.0);
pub const emphasisGreen = Color.hsla(120, 1.0, 0.5, 1.0);