nvim/telescope: change bindings

This commit is contained in:
Primrose 2025-07-09 20:30:47 +02:00
parent 98910c755b
commit ff5c9dd314
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -19,14 +19,17 @@ telescope.setup {
vimgrep_arguments = vimgrep_arguments,
mappings = {
n = {
-- Make it harder to accidently quit
["<C-c>"] = actions.close,
["r"] = actions.to_fuzzy_refine,
["j"] = actions.move_selection_next,
["k"] = actions.move_selection_previous,
["<Esc>"] = actions.nop,
["<C-r>"] = actions.to_fuzzy_refine,
["<C-Up>"] = actions.cycle_history_prev,
["<C-Down>"] = actions.cycle_history_next,
},
i = {
["<Up>"] = actions.cycle_history_prev,
["<Down>"] = actions.cycle_history_next,
["<C-Up>"] = actions.cycle_history_prev,
["<C-Down>"] = actions.cycle_history_next,
},
},
layout_config = { height = 0.5 },
@ -82,7 +85,6 @@ vim.keymap.set("n", "<leader>/", builtin["current_buffer_fuzzy_find"])
vim.keymap.set("n", "<leader>w", find_undercursor_in_buffer)
vim.keymap.set("n", "<leader>W", grep_undercursor)
-- Use / as prefix to avoid collision in bindings
vim.keymap.set("n", "<leader>sf", builtin["find_files"])
vim.keymap.set("n", "<leader>sg", builtin["live_grep"])
vim.keymap.set("n", "<leader>sd", builtin["diagnostics"])