From ff5c9dd31450138b739c2433321d4950cef6347c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 9 Jul 2025 20:30:47 +0200 Subject: [PATCH] nvim/telescope: change bindings --- .config/nvim/plugin/telescope.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.config/nvim/plugin/telescope.lua b/.config/nvim/plugin/telescope.lua index 98e907e0..55c76b40 100644 --- a/.config/nvim/plugin/telescope.lua +++ b/.config/nvim/plugin/telescope.lua @@ -19,14 +19,17 @@ telescope.setup { vimgrep_arguments = vimgrep_arguments, mappings = { n = { + -- Make it harder to accidently quit [""] = actions.close, - ["r"] = actions.to_fuzzy_refine, - ["j"] = actions.move_selection_next, - ["k"] = actions.move_selection_previous, + [""] = actions.nop, + + [""] = actions.to_fuzzy_refine, + [""] = actions.cycle_history_prev, + [""] = actions.cycle_history_next, }, i = { - [""] = actions.cycle_history_prev, - [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + [""] = actions.cycle_history_next, }, }, layout_config = { height = 0.5 }, @@ -82,7 +85,6 @@ vim.keymap.set("n", "/", builtin["current_buffer_fuzzy_find"]) vim.keymap.set("n", "w", find_undercursor_in_buffer) vim.keymap.set("n", "W", grep_undercursor) --- Use / as prefix to avoid collision in bindings vim.keymap.set("n", "sf", builtin["find_files"]) vim.keymap.set("n", "sg", builtin["live_grep"]) vim.keymap.set("n", "sd", builtin["diagnostics"])