From bcb5775dabf2b9144d8a87721d0095d087827f3e Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Sat, 30 Aug 2025 15:00:26 -0300 Subject: =?UTF-8?q?feat(keymaps,=20plugins):=20agrega=20integraci=C3=B3n?= =?UTF-8?q?=20con=20Floaterm=20y=20elimina=20Harpoon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Se añadió el plugin Floaterm para soporte de terminal flotante, incluyendo el mapeo ft para alternar el terminal. - Se eliminó el plugin Harpoon y sus mapeos relacionados para navegación de archivos y terminales. - Se refactorizaron los mapeos de teclas para mayor consistencia y legibilidad. - Motivación: simplificar el flujo de trabajo con terminales y reducir la cantidad de plugins reemplazando Harpoon por Floaterm. --- lua/config/keymaps.lua | 126 +++++++++++++++++-------------------------------- 1 file changed, 44 insertions(+), 82 deletions(-) (limited to 'lua/config') diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index c42bf71..07c9d77 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -1,9 +1,9 @@ local map = vim.keymap.set map("v", "p", function() - local val = vim.fn.getreg '+' + local val = vim.fn.getreg "+" vim.api.nvim_command [[normal! p]] - vim.fn.setreg('+', val) + vim.fn.setreg("+", val) end, { desc = "Special paste, paste without replacing copy register content" }) map("n", "mm", function() @@ -69,98 +69,60 @@ map( { desc = "Save the current file and source it for .vim and .lua files" } ) -map( - "n", - "vn", - function() vim.diagnostic.jump({ count = 1, float = true }) end, - { desc = "Goes to next diagnostic error" } -) -map( - "n", - "vp", - function() vim.diagnostic.jump({ count = -1, float = true }) end, - { desc = "Goes to prev diagnostic error" } -) +map("n", "vn", function() + vim.diagnostic.jump { count = 1, float = true } +end, { desc = "Goes to next diagnostic error" }) +map("n", "vp", function() + vim.diagnostic.jump { count = -1, float = true } +end, { desc = "Goes to prev diagnostic error" }) -map("v", "q", require('pi.select_to_quickfix').handle) -map('n', '99', ':set invspell', { noremap = true }) +map("v", "q", require("pi.select_to_quickfix").handle) +map("n", "99", ":set invspell", { noremap = true }) -- map("n", "ss", function() require('nvim-python-repl').send_statement_definition() end, { desc = "Send semantic unit to REPL"}) vim.api.nvim_set_keymap( - 'n', - '', + "n", + "", [[:lua require('nvim-python-repl').send_statement_definition()j]], - {noremap = true, silent = true} + { noremap = true, silent = true } ) vim.api.nvim_set_keymap( - 'i', - '', + "i", + "", [[:lua require('nvim-python-repl').send_statement_definition()i]], - {noremap = true, silent = true} -) -map( - "n", - "sl", - function() require('nvim-python-repl').send_visual_to_repl() end, - { desc = "Send visual selection to REPL"} -) -map( - "v", - "sl", - function() require('nvim-python-repl').send_visual_to_repl() end, - { desc = "Send visual selection to REPL"} -) -map( - "n", - "MReturn", - function() require('nvim-python-repl').send_buffer_to_repl() end, - { desc = "Send entire buffer to REPL"} -) -map( - "n", - "e", - function() require('nvim-python-repl').toggle_execute() end, - { desc = "Automatically execute command in REPL after sent"} -) -map( - "n", - "vi", - function() require('nvim-python-repl').toggle_vertical() end, - { desc = "Create REPL in vertical or horizontal split"} -) -map( - "n", - "-", - "Oil", - { desc = "Open parent directory" } -) -map( - "n", - "fg", - function() require('telescope').extensions.live_grep_args.live_grep_args() end, - {desc = "run grep"} + { noremap = true, silent = true } ) +map("n", "sl", function() + require("nvim-python-repl").send_visual_to_repl() +end, { desc = "Send visual selection to REPL" }) +map("v", "sl", function() + require("nvim-python-repl").send_visual_to_repl() +end, { desc = "Send visual selection to REPL" }) +map("n", "MReturn", function() + require("nvim-python-repl").send_buffer_to_repl() +end, { desc = "Send entire buffer to REPL" }) +map("n", "e", function() + require("nvim-python-repl").toggle_execute() +end, { desc = "Automatically execute command in REPL after sent" }) +map("n", "vi", function() + require("nvim-python-repl").toggle_vertical() +end, { desc = "Create REPL in vertical or horizontal split" }) +map("n", "-", "Oil", { desc = "Open parent directory" }) +map("n", "fg", function() + require("telescope").extensions.live_grep_args.live_grep_args() +end, { desc = "run grep" }) -- Asignar la función a una tecla específica -vim.api.nvim_set_keymap( - 'n', - 'w', - ':lua ToggleWrap()', - { noremap = true, silent = true } -) -map( - "n", - "rrn", - ':RustLsp runnables', - {desc = "run rust"} -) -vim.keymap.set('n', 'pdm', function() - require('dap-python').test_method() +vim.api.nvim_set_keymap("n", "w", ":lua ToggleWrap()", { noremap = true, silent = true }) +map("n", "rrn", ":RustLsp runnables", { desc = "run rust" }) +vim.keymap.set("n", "pdm", function() + require("dap-python").test_method() end) -vim.keymap.set('n', 'pdc', function() - require('dap-python').test_class() +vim.keymap.set("n", "pdc", function() + require("dap-python").test_class() end) -vim.keymap.set('n', 'pdf', function() - require('dap-python').test_file() +vim.keymap.set("n", "pdf", function() + require("dap-python").test_file() end) +map("n", "ft", "FloatermToggle", { desc = "run terminal" }) -- cgit v1.2.3