Compare commits

..

5 commits

Author SHA1 Message Date
a5d3eb18f3
feat: add automatic dark/light mode support
This adds a new configuration option `light_theme` and support for automatically
switching the active dark/light theme from terminal events.

closes #302
2025-09-27 23:24:12 +02:00
Igor Támara
1ade0b1b89 feat: use modal behavior from flow to support helix mode
Using sane defaults from flow to

<space>b choose buffer using flow default picker
<space>f choose file using flow default picker
<space>/ find in files with flow default pane (ripgrep)
2025-09-25 22:24:00 +02:00
Igor Támara
2390590279 feat: add shorcuts for buffers in helix mode
## Added Behaviour for buffers

:n create a new buffer - Uses language selection from flow <3
:bc close current buffer
:bn next buffer
:bp previous buffer
:rl reload current buffer
:qa! abandon without saving any buffer
2025-09-25 22:24:00 +02:00
Igor Támara
21384b7a5f feat: add % for select_all and zz to scroll_view_center in helix mode 2025-09-25 22:24:00 +02:00
Igor Támara
9db6bf56c1 feat: add :x alias for :wq in helix mode 2025-09-25 22:24:00 +02:00
2 changed files with 44 additions and 5 deletions

View file

@ -14,6 +14,7 @@
["ctrl+f", "move_scroll_page_down"],
["ctrl+u", "move_scroll_half_page_up"],
["ctrl+d", "move_scroll_half_page_down"],
["z z", "scroll_view_center"],
["ctrl+c", "toggle_comment"],
["ctrl+i", "jump_forward"],
["ctrl+o", "jump_back"],
@ -191,6 +192,7 @@
["u", "undo"],
["y", ["enable_selection"], ["copy_helix"], ["enter_mode", "normal"]],
["%", "select_all"],
["p", "paste_after"],
["q", "record_macro"],
@ -213,7 +215,7 @@
["space R", "replace_selections_with_clipboard"],
["space ?", "open_command_palette"],
["space f", "find_file"],
["space b", "buffer_picker"],
["space b", "switch_buffers"],
["space j", "jumplist_picker"],
["space s", "symbol_picker"],
["space d", "diagnostics_picker"],
@ -221,7 +223,7 @@
["space '", "last_picker"],
["space y", "copy"],
["space p", "system_paste_after"],
["space /", "find_in_file"],
["space /", "find_in_files"],
["space k", "hover"],
["space r", "rename_symbol"],
["space h", "select_references_to_symbol_under_cursor"],
@ -265,6 +267,7 @@
["ctrl+f", "select_page_down"],
["ctrl+u", "select_half_page_up"],
["ctrl+d", "select_half_page_down"],
["z z", "scroll_view_center"],
["ctrl+c", "toggle_comment"],
@ -390,6 +393,7 @@
["kp_down", "select_down"],
["kp_up", "select_up"],
["kp_right", "select_right"],
["%", "select_all"],
["t", "extend_till_char"],
["f", "move_to_char", "select_to_char_right_helix"],
@ -497,8 +501,8 @@
["space R", "replace_selections_with_clipboard"],
["space ?", "open_command_palette"],
["space f", "file_picker"],
["space b", "buffer_picker"],
["space f", "find_file"],
["space b", "switch_buffers"],
["space j", "jumplist_picker"],
["space s", "symbol_picker"],
["space d", "diagnostics_picker"],
@ -506,7 +510,7 @@
["space '", "last_picker"],
["space y", "copy"],
["space p", "system_paste_after"],
["space /", "find_in_file"],
["space /", "find_in_files"],
["space k", "hover"],
["space r", "rename_symbol"],
["space h", "select_references_to_symbol_under_cursor"],

View file

@ -45,11 +45,26 @@ const cmds_ = struct {
}
pub const @"q!_meta": Meta = .{ .description = "q! (quit without saving)" };
pub fn @"qa!"(_: *void, _: Ctx) Result {
try cmd("quit_without_saving", .{});
}
pub const @"qa!_meta": Meta = .{ .description = "qa! (quit without saving)" };
pub fn wq(_: *void, _: Ctx) Result {
try cmd("save_file", command.fmt(.{ "then", .{ "quit", .{} } }));
}
pub const wq_meta: Meta = .{ .description = "wq (write/save file and quit)" };
pub fn x(_: *void, _: Ctx) Result {
try cmd("save_file", command.fmt(.{ "then", .{ "quit", .{} } }));
}
pub const x_meta: Meta = .{ .description = "x (write/save file and quit)" };
pub fn rl(_: *void, _: Ctx) Result {
try cmd("reload_file", .{});
}
pub const rl_meta: Meta = .{ .description = "rl (force reload current file)" };
pub fn o(_: *void, _: Ctx) Result {
try cmd("open_file", .{});
}
@ -61,6 +76,26 @@ const cmds_ = struct {
}
pub const @"wq!_meta": Meta = .{ .description = "wq! (write/save file and quit without saving)" };
pub fn n(_: *void, _: Ctx) Result {
try cmd("create_new_file", .{});
}
pub const n_meta: Meta = .{ .description = "n (Create new buffer/tab)" };
pub fn bn(_: *void, _: Ctx) Result {
try cmd("next_tab", .{});
}
pub const bn_meta: Meta = .{ .description = "bn (Next buffer/tab)" };
pub fn bp(_: *void, _: Ctx) Result {
try cmd("previous_tab", .{});
}
pub const bp_meta: Meta = .{ .description = "bp (Previous buffer/tab)" };
pub fn bc(_: *void, _: Ctx) Result {
try cmd("delete_buffer", .{});
}
pub const bc_meta: Meta = .{ .description = "bc (Close buffer/tab)" };
pub fn save_selection(_: *void, _: Ctx) Result {
const logger = log.logger("helix-mode");
defer logger.deinit();