Compare commits

...

2 commits

2 changed files with 19 additions and 0 deletions

View file

@ -378,6 +378,7 @@
"overlay/dropdown": {
"inherit": "normal",
"press": [
["alt+f9", "dropdown_next_widget_style"],
["ctrl+p", "palette_menu_up"],
["ctrl+n", "palette_menu_down"],
["escape", "palette_menu_cancel"],

View file

@ -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,
@ -1580,6 +1591,13 @@ const cmds = struct {
try save_config();
}
pub const hint_window_next_widget_style_meta: Meta = .{};
pub fn dropdown_next_widget_style(_: *Self, _: Ctx) Result {
set_next_style(.dropdown);
need_render();
try save_config();
}
pub const dropdown_next_widget_style_meta: Meta = .{};
};
pub const MiniMode = struct {