diff --git a/build.zig.zon b/build.zig.zon index 79607d5..2d50a2a 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -6,8 +6,8 @@ .dependencies = .{ .syntax = .{ - .url = "git+https://github.com/neurocyte/flow-syntax?ref=master#0221af1286fc419c2fb1caedd9b5f445254d7129", - .hash = "flow_syntax-0.1.0-X8jOof0SAQAOewEP2MRQ1wlhOP6l_CgRCsPS55-ksbPu", + .url = "git+https://github.com/neurocyte/flow-syntax?ref=master#05938cb0256b6028458234880bb750e0c368d750", + .hash = "flow_syntax-0.1.0-X8jOofgHAQBCPwteYCfJmIpwXgJo_4HmJeSp6tTf2xCf", }, .flags = .{ .url = "git+https://github.com/neurocyte/flags?ref=main#984b27948da3e4e40a253f76c85b51ec1a9ada11", diff --git a/src/keybind/builtin/helix.json b/src/keybind/builtin/helix.json index 0eeb9b9..fd35500 100644 --- a/src/keybind/builtin/helix.json +++ b/src/keybind/builtin/helix.json @@ -71,7 +71,7 @@ ["A", ["enter_mode", "insert"], ["move_end"]], ["O", ["enter_mode", "insert"], ["smart_insert_line_before"]], - ["C", "add_cursor_down"], + ["C", "copy_selection_on_next_line"], ["S", "split_selection"], ["X", "extend_to_line_bounds"], ["?", "rfind"], @@ -129,7 +129,7 @@ ["g s", "smart_move_begin"], ["g d", "goto_definition"], ["g y", "goto_type_definition"], - ["g r", "references"], + ["g r", "goto_reference"], ["g i", "goto_implementation"], ["g t", "goto_window_top"], ["g c", "goto_window_center"], @@ -218,7 +218,7 @@ ["space b", "switch_buffers"], ["space j", "jumplist_picker"], ["space s", "symbol_picker"], - ["space d", "show_diagnostics"], + ["space d", "diagnostics_picker"], ["space a", "code_action"], ["space '", "last_picker"], ["space y", "copy"], @@ -253,7 +253,6 @@ ["ctrl+y", "redo"], ["ctrl+c", "enter_mode", "normal"], ["ctrl+o", "run_ls"], - ["ctrl+k", "delete_to_end"], ["escape", "enter_mode", "normal"] ] }, @@ -264,12 +263,6 @@ "selection": "inclusive", "init_command": ["enable_selection"], "press": [ - - ["b", "select_word_left"], - ["w", "select_word_right"], - ["g g", "select_buffer_begin"], - ["g e", "select_buffer_end"], - ["ctrl+b", "select_page_up"], ["ctrl+f", "select_page_down"], ["ctrl+u", "select_half_page_up"], @@ -512,7 +505,7 @@ ["space b", "switch_buffers"], ["space j", "jumplist_picker"], ["space s", "symbol_picker"], - ["space d", "show_diagnostics"], + ["space d", "diagnostics_picker"], ["space a", "code_action"], ["space '", "last_picker"], ["space y", "copy"], diff --git a/src/tui/mode/helix.zig b/src/tui/mode/helix.zig index d186cf3..3eb23d9 100644 --- a/src/tui/mode/helix.zig +++ b/src/tui/mode/helix.zig @@ -40,11 +40,6 @@ const cmds_ = struct { } pub const q_meta: Meta = .{ .description = "q (quit)" }; - pub fn qa(_: *void, _: Ctx) Result { - try cmd("quit", .{}); - } - pub const qa_meta: Meta = .{ .description = "qa (close all)" }; - pub fn @"q!"(_: *void, _: Ctx) Result { try cmd("quit_without_saving", .{}); } @@ -65,52 +60,6 @@ const cmds_ = struct { } pub const x_meta: Meta = .{ .description = "x (write/save file and quit)" }; - // This one needs some help, the intention is to close only the current buffer - // , if is the only buffer, exit... - // TODO - // pub fn @"x!"(_: *void, _: Ctx) Result { - // try cmd("save_file", .{}); - // try cmd("close_file_without_saving", .{}); - // } - // pub const @"x!_meta": Meta = .{ .description = "x! (write/save file and close forcefully, ignoring unsaved changes)" }; - - pub fn wa(_: *void, _: Ctx) Result { - if (tui.get_buffer_manager()) |bm| - bm.save_all() catch |e| return tp.exit_error(e, @errorReturnTrace()); - } - pub const wa_meta: Meta = .{ .description = "wa (save all)" }; - - pub fn xa(_: *void, _: Ctx) Result { - if (tui.get_buffer_manager()) |bm| { - bm.save_all() catch |e| return tp.exit_error(e, @errorReturnTrace()); - try cmd("quit", .{}); - } - } - pub const xa_meta: Meta = .{ .description = "xa (write all and quit)" }; - - pub fn @"xa!"(_: *void, _: Ctx) Result { - if (tui.get_buffer_manager()) |bm| { - bm.save_all() catch {}; - try cmd("quit_without_saving", .{}); - } - } - pub const @"xa!_meta": Meta = .{ .description = "xa! (write all and quit forcefully, ignoring unsaved changes)" }; - - pub fn wqa(_: *void, _: Ctx) Result { - if (tui.get_buffer_manager()) |bm| - bm.save_all() catch |e| return tp.exit_error(e, @errorReturnTrace()); - try cmd("quit", .{}); - } - pub const wqa_meta: Meta = .{ .description = "wqa (write all and quit)" }; - - pub fn @"wqa!"(_: *void, _: Ctx) Result { - if (tui.get_buffer_manager()) |bm| { - bm.save_all() catch {}; - try cmd("quit_without_saving", .{}); - } - } - pub const @"wqa!_meta": Meta = .{ .description = "wqa! (write all and quit forcefully, ignoring unsaved changes)" }; - pub fn rl(_: *void, _: Ctx) Result { try cmd("reload_file", .{}); } @@ -147,11 +96,6 @@ const cmds_ = struct { } pub const bc_meta: Meta = .{ .description = "bc (Close buffer/tab)" }; - pub fn @"bc!"(_: *void, _: Ctx) Result { - try cmd("close_file_without_saving", .{}); - } - pub const @"bc!_meta": Meta = .{ .description = "bc! (Close buffer/tab forcefully, ignoring changes)" }; - pub fn save_selection(_: *void, _: Ctx) Result { const logger = log.logger("helix-mode"); defer logger.deinit();