From 39faf19824fcfc92394914cbc10a5d8a59bea49d Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Tue, 18 Nov 2025 20:07:48 +0100 Subject: [PATCH] feat: restore search + rename mappgins --- lua/config/remap.lua | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/lua/config/remap.lua b/lua/config/remap.lua index e9eb849..0254207 100644 --- a/lua/config/remap.lua +++ b/lua/config/remap.lua @@ -128,30 +128,8 @@ map("v", "ca", function() vim.lsp.buf.code_action() end, { desc = "LSP code action" }) map("n", "r", function() - -- when rename opens the prompt, this autocommand will trigger - -- it will "press" CTRL-F to enter the command-line window `:h cmdwin` - -- in this window I can use normal mode keybindings - local cmdId - cmdId = vim.api.nvim_create_autocmd({ "CmdlineEnter" }, { - callback = function() - local key = vim.api.nvim_replace_termcodes("", true, false, true) - vim.api.nvim_feedkeys(key, "c", false) - vim.api.nvim_feedkeys("0", "n", false) - -- autocmd was triggered and so we can remove the ID and return true to delete the autocmd - cmdId = nil - return true - end, - }) vim.lsp.buf.rename() - -- if LPS couldn't trigger rename on the symbol, clear the autocmd - vim.defer_fn(function() - -- the cmdId is not nil only if the LSP failed to rename - if cmdId then - vim.api.nvim_del_autocmd(cmdId) - end - end, 500) -end, { desc = "Rename symbol" }) - +end, { desc = "LSP rename" }) map("n", "wa", function() vim.lsp.buf.add_workspace_folder() end, { desc = "Add workspace folder" }) @@ -178,6 +156,7 @@ map("n", "cdo", ":DapStepOver") ---- Telescope find ---- +map("n", "F", " Telescope resume ", { desc = "Resume las search" }) map("n", "ff", " Telescope find_files ", { desc = "Find files" }) map("n", "fa", " Telescope find_files follow=true no_ignore=true hidden=true ", { desc = "Find all" }) map("n", "fw", " Telescope live_grep ", { desc = "Live grep" })