feat: add enable_prefix_keyhints option

This commit is contained in:
CJ van den Berg 2025-12-02 16:20:35 +01:00
parent 3dfb93fbd2
commit 0136c8b49c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 3 additions and 1 deletions

View file

@ -29,6 +29,7 @@ default_cursor: CursorShape = .default,
modes_can_change_cursor: bool = true, modes_can_change_cursor: bool = true,
enable_auto_save: bool = false, enable_auto_save: bool = false,
limit_auto_save_file_types: ?[]const []const u8 = null, // null means *all* limit_auto_save_file_types: ?[]const []const u8 = null, // null means *all*
enable_prefix_keyhints: bool = true,
indent_size: usize = 4, indent_size: usize = 4,
tab_width: usize = 8, tab_width: usize = 8,

View file

@ -565,7 +565,8 @@ fn render(self: *Self) void {
const continue_mainview = if (self.mainview_) |mv| mv.render(self.current_theme()) else false; const continue_mainview = if (self.mainview_) |mv| mv.render(self.current_theme()) else false;
switch (self.hint_mode) { switch (self.hint_mode) {
.prefix => @import("keyhints.zig").render_current_key_event_sequence(self.allocator, .no_keypad, self.current_theme()), .prefix => if (self.config_.enable_prefix_keyhints)
@import("keyhints.zig").render_current_key_event_sequence(self.allocator, .no_keypad, self.current_theme()),
.all => @import("keyhints.zig").render_current_input_mode(self.allocator, .no_keypad, self.current_theme()), .all => @import("keyhints.zig").render_current_input_mode(self.allocator, .no_keypad, self.current_theme()),
.none => {}, .none => {},
} }