diff --git a/src/keybind/dynamic/keybind.zig b/src/keybind/dynamic/keybind.zig index c5f998a..9cdc0c7 100644 --- a/src/keybind/dynamic/keybind.zig +++ b/src/keybind/dynamic/keybind.zig @@ -219,8 +219,8 @@ const BindingSet = struct { fn load_set_from_json(self: *BindingSet, mode_bindings: std.json.Value) (parse_flow.ParseError || parse_vim.ParseError || std.json.ParseFromValueError)!void { const JsonConfig = struct { bindings: []const []const std.json.Value, - syntax: KeySyntax, - on_match_failure: OnMatchFailure, + syntax: KeySyntax = .flow, + on_match_failure: OnMatchFailure = .insert, }; const parsed = try std.json.parseFromValue(JsonConfig, self.allocator, mode_bindings, .{ .ignore_unknown_fields = true, diff --git a/src/keybind/dynamic/keybindings.json b/src/keybind/dynamic/keybindings.json index 1da8a7a..42ed6a6 100644 --- a/src/keybind/dynamic/keybindings.json +++ b/src/keybind/dynamic/keybindings.json @@ -1,8 +1,6 @@ { "flow": { "normal": { - "syntax": "flow", - "on_match_failure": "insert", "bindings": [ ["ctrl+e", "open_recent"], ["ctrl+r", "open_recent_project"], @@ -145,7 +143,6 @@ ] }, "home": { - "syntax": "flow", "on_match_failure": "ignore", "bindings": [ ["ctrl+f>ctrl+f>ctrl+f>ctrl+f>ctrl+f", "home_sheeran"], @@ -188,8 +185,6 @@ ] }, "palette": { - "syntax": "flow", - "on_match_failure": "insert", "bindings": [ ["ctrl+j", "toggle_panel"], ["ctrl+q", "quit"], @@ -238,8 +233,6 @@ ] }, "mini/goto": { - "syntax": "flow", - "on_match_failure": "insert", "bindings": [ ["ctrl+q", "quit"], ["ctrl+v", "system_paste"], @@ -255,8 +248,6 @@ ] }, "mini/move_to_char": { - "syntax": "flow", - "on_match_failure": "insert", "bindings": [ ["ctrl+g", "mini_mode_cancel"], ["ctrl+c", "mini_mode_cancel"], @@ -266,8 +257,6 @@ ] }, "mini/file_browser": { - "syntax": "flow", - "on_match_failure": "insert", "bindings": [ ["ctrl+q", "quit"], ["ctrl+v", "system_paste"], @@ -295,8 +284,6 @@ ] }, "mini/find_in_files": { - "syntax": "flow", - "on_match_failure": "insert", "bindings": [ ["ctrl+q", "quit"], ["ctrl+v", "system_paste"], @@ -332,8 +319,6 @@ ] }, "mini/find": { - "syntax": "flow", - "on_match_failure": "insert", "bindings": [ ["ctrl+q", "quit"], ["ctrl+v", "system_paste"], @@ -410,7 +395,6 @@ }, "insert": { "syntax": "vim", - "on_match_failure": "insert", "bindings": [ ["jk", "enter_mode", "normal"], ["", "enter_mode", "normal"] @@ -420,7 +404,6 @@ "emacs" : { "base": { "syntax": "vim", - "on_match_failure": "insert", "bindings": [ ["", "cursor_line_start"], ["", "cursor_line_end"],