feat: generate hints for dynamic keybindings

This commit is contained in:
CJ van den Berg 2024-11-19 18:08:14 +01:00
parent 271f45e78a
commit 3af2b09891
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
10 changed files with 98 additions and 64 deletions

View file

@ -48,12 +48,14 @@ pub fn Create(options: type) type {
try options.load_entries(self);
if (@hasDecl(options, "restore_state"))
options.restore_state(self) catch {};
const input_handler, const keybind_hints = try keybind.mode.mini.file_browser.create(allocator, .{
.insert_command = "mini_mode_insert_bytes",
});
return .{
.{
.input_handler = try keybind.mode.mini.file_browser.create(allocator, .{
.insert_command = "mini_mode_insert_bytes",
}),
.input_handler = input_handler,
.event_handler = EventHandler.to_owned(self),
.keybind_hints = keybind_hints,
},
.{
.name = options.name(self),