Merge branch 'master' into zig-0.15
This commit is contained in:
commit
2992b0f520
3 changed files with 69 additions and 6 deletions
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.syntax = .{
|
.syntax = .{
|
||||||
.url = "git+https://github.com/neurocyte/flow-syntax?ref=master#05938cb0256b6028458234880bb750e0c368d750",
|
.url = "git+https://github.com/neurocyte/flow-syntax?ref=master#0221af1286fc419c2fb1caedd9b5f445254d7129",
|
||||||
.hash = "flow_syntax-0.1.0-X8jOofgHAQBCPwteYCfJmIpwXgJo_4HmJeSp6tTf2xCf",
|
.hash = "flow_syntax-0.1.0-X8jOof0SAQAOewEP2MRQ1wlhOP6l_CgRCsPS55-ksbPu",
|
||||||
},
|
},
|
||||||
.flags = .{
|
.flags = .{
|
||||||
.url = "git+https://github.com/neurocyte/flags?ref=main#984b27948da3e4e40a253f76c85b51ec1a9ada11",
|
.url = "git+https://github.com/neurocyte/flags?ref=main#984b27948da3e4e40a253f76c85b51ec1a9ada11",
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
["A", ["enter_mode", "insert"], ["move_end"]],
|
["A", ["enter_mode", "insert"], ["move_end"]],
|
||||||
["O", ["enter_mode", "insert"], ["smart_insert_line_before"]],
|
["O", ["enter_mode", "insert"], ["smart_insert_line_before"]],
|
||||||
|
|
||||||
["C", "copy_selection_on_next_line"],
|
["C", "add_cursor_down"],
|
||||||
["S", "split_selection"],
|
["S", "split_selection"],
|
||||||
["X", "extend_to_line_bounds"],
|
["X", "extend_to_line_bounds"],
|
||||||
["?", "rfind"],
|
["?", "rfind"],
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
["g s", "smart_move_begin"],
|
["g s", "smart_move_begin"],
|
||||||
["g d", "goto_definition"],
|
["g d", "goto_definition"],
|
||||||
["g y", "goto_type_definition"],
|
["g y", "goto_type_definition"],
|
||||||
["g r", "goto_reference"],
|
["g r", "references"],
|
||||||
["g i", "goto_implementation"],
|
["g i", "goto_implementation"],
|
||||||
["g t", "goto_window_top"],
|
["g t", "goto_window_top"],
|
||||||
["g c", "goto_window_center"],
|
["g c", "goto_window_center"],
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
["space b", "switch_buffers"],
|
["space b", "switch_buffers"],
|
||||||
["space j", "jumplist_picker"],
|
["space j", "jumplist_picker"],
|
||||||
["space s", "symbol_picker"],
|
["space s", "symbol_picker"],
|
||||||
["space d", "diagnostics_picker"],
|
["space d", "show_diagnostics"],
|
||||||
["space a", "code_action"],
|
["space a", "code_action"],
|
||||||
["space '", "last_picker"],
|
["space '", "last_picker"],
|
||||||
["space y", "copy"],
|
["space y", "copy"],
|
||||||
|
@ -253,6 +253,7 @@
|
||||||
["ctrl+y", "redo"],
|
["ctrl+y", "redo"],
|
||||||
["ctrl+c", "enter_mode", "normal"],
|
["ctrl+c", "enter_mode", "normal"],
|
||||||
["ctrl+o", "run_ls"],
|
["ctrl+o", "run_ls"],
|
||||||
|
["ctrl+k", "delete_to_end"],
|
||||||
["escape", "enter_mode", "normal"]
|
["escape", "enter_mode", "normal"]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -263,6 +264,12 @@
|
||||||
"selection": "inclusive",
|
"selection": "inclusive",
|
||||||
"init_command": ["enable_selection"],
|
"init_command": ["enable_selection"],
|
||||||
"press": [
|
"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+b", "select_page_up"],
|
||||||
["ctrl+f", "select_page_down"],
|
["ctrl+f", "select_page_down"],
|
||||||
["ctrl+u", "select_half_page_up"],
|
["ctrl+u", "select_half_page_up"],
|
||||||
|
@ -505,7 +512,7 @@
|
||||||
["space b", "switch_buffers"],
|
["space b", "switch_buffers"],
|
||||||
["space j", "jumplist_picker"],
|
["space j", "jumplist_picker"],
|
||||||
["space s", "symbol_picker"],
|
["space s", "symbol_picker"],
|
||||||
["space d", "diagnostics_picker"],
|
["space d", "show_diagnostics"],
|
||||||
["space a", "code_action"],
|
["space a", "code_action"],
|
||||||
["space '", "last_picker"],
|
["space '", "last_picker"],
|
||||||
["space y", "copy"],
|
["space y", "copy"],
|
||||||
|
|
|
@ -40,6 +40,11 @@ const cmds_ = struct {
|
||||||
}
|
}
|
||||||
pub const q_meta: Meta = .{ .description = "q (quit)" };
|
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 {
|
pub fn @"q!"(_: *void, _: Ctx) Result {
|
||||||
try cmd("quit_without_saving", .{});
|
try cmd("quit_without_saving", .{});
|
||||||
}
|
}
|
||||||
|
@ -60,6 +65,52 @@ const cmds_ = struct {
|
||||||
}
|
}
|
||||||
pub const x_meta: Meta = .{ .description = "x (write/save file and quit)" };
|
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 {
|
pub fn rl(_: *void, _: Ctx) Result {
|
||||||
try cmd("reload_file", .{});
|
try cmd("reload_file", .{});
|
||||||
}
|
}
|
||||||
|
@ -96,6 +147,11 @@ const cmds_ = struct {
|
||||||
}
|
}
|
||||||
pub const bc_meta: Meta = .{ .description = "bc (Close buffer/tab)" };
|
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 {
|
pub fn save_selection(_: *void, _: Ctx) Result {
|
||||||
const logger = log.logger("helix-mode");
|
const logger = log.logger("helix-mode");
|
||||||
defer logger.deinit();
|
defer logger.deinit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue