From 394eb5405f3608ea97f1bfc618d4f7619de8440b Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 18 Dec 2025 22:16:34 +0100 Subject: [PATCH] feat: add toggle_completion_style command --- src/tui/tui.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/tui/tui.zig b/src/tui/tui.zig index 08a355b..9d12feb 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -1108,6 +1108,17 @@ const cmds = struct { } pub const toggle_centered_view_meta: Meta = .{ .description = "Toggle centered view" }; + pub fn toggle_completion_style(self: *Self, _: Ctx) Result { + self.config_.completion_style = switch (self.config_.completion_style) { + .palette => .dropdown, + .dropdown => .palette, + }; + defer self.logger.print("completion style {t}", .{self.config_.completion_style}); + try save_config(); + resize(); + } + pub const toggle_completion_style_meta: Meta = .{ .description = "Toggle completion style" }; + pub fn toggle_keybind_hints(self: *Self, _: Ctx) Result { self.hint_mode = switch (self.hint_mode) { .all => .prefix,