From 7a32abb7c07c320cdeae19897d9daaea48acb1bb Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Sun, 30 Nov 2025 23:37:04 -0300 Subject: =?UTF-8?q?refactorizaci=C3=B3n!:=20migraci=C3=B3n=20de=20la=20fun?= =?UTF-8?q?cionalidad=20de=20b=C3=BAsqueda=20y=20selecci=C3=B3n=20de=20arc?= =?UTF-8?q?hivos=20de=20Telescope=20a=20Snacks.nvim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CAMBIO IMPORTANTE: Se elimina el plugin Telescope y los módulos personalizados relacionados (init, mappings, my_actions, setup). Toda la navegación y búsqueda de archivos, buffers y selectores ahora utiliza Snacks.nvim. Se actualizan los mapeos de teclas y las dependencias de plugins para reflejar esta migración. También se modifican las configuraciones de plugins (codecompanion, copilot-chat, dap, lualine, refactoring, todo-comments) para eliminar o reemplazar el uso de Telescope por Snacks. Algunas opciones de formato en null-ls se comentan. Este cambio requiere Snacks.nvim y elimina nvim-telescope/telescope.nvim del espacio de trabajo. --- lua/plugins/snacks.lua | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 lua/plugins/snacks.lua (limited to 'lua/plugins/snacks.lua') diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua new file mode 100644 index 0000000..bcec3e5 --- /dev/null +++ b/lua/plugins/snacks.lua @@ -0,0 +1,88 @@ +return { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + ---@type snacks.Config + opts = { + bigfile = { enabled = true }, + dashboard = { enabled = true }, + explorer = { enabled = true }, + indent = { enabled = true }, + input = { enabled = true }, + notifier = { enabled = true }, + picker = { enabled = true }, + quickfile = { enabled = true }, + scope = { enabled = true }, + scroll = { enabled = true }, + statuscolumn = { enabled = true }, + words = { enabled = true }, + }, + keys = { + -- Top Pickers & Explorer + { "", function() Snacks.picker.smart() end, desc = "Smart Find Files" }, + { ",", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "/", function() Snacks.picker.grep() end, desc = "Grep" }, + { ":", function() Snacks.picker.command_history() end, desc = "Command History" }, + { "n", function() Snacks.picker.notifications() end, desc = "Notification History" }, + { "e", function() Snacks.explorer() end, desc = "File Explorer" }, + -- find + { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" }, + { "ff", function() Snacks.picker.files() end, desc = "Find Files" }, + { "gf", function() Snacks.picker.git_files() end, desc = "Find Git Files" }, + { "fr", function() Snacks.picker.recent() end, desc = "Recent" }, + -- git + { "gl", function() Snacks.picker.git_log() end, desc = "Git Log" }, + { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, + -- Grep + { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, + { "sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" }, + { "sg", function() Snacks.picker.grep() end, desc = "Grep" }, + { "sw", function() Snacks.picker.grep_word() end, desc = "Visual selection or word", mode = { "n", "x" } }, + -- search + { 's"', function() Snacks.picker.registers() end, desc = "Registers" }, + { 's/', function() Snacks.picker.search_history() end, desc = "Search History" }, + { "sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" }, + { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, + { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, + { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, + { "sh", function() Snacks.picker.help() end, desc = "Help Pages" }, + { "si", function() Snacks.picker.icons() end, desc = "Icons" }, + { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, + { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, + { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, + { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, + { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, + { "su", function() Snacks.picker.undo() end, desc = "Undo History" }, + { "st", function() Snacks.picker.todo_comments() end, desc = "Todo" }, + { "sT", function() Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, + { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, + -- LSP + { "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition" }, + { "gD", function() Snacks.picker.lsp_declarations() end, desc = "Goto Declaration" }, + { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, + { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, + { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, + { "ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" }, + { "sS", function() Snacks.picker.lsp_workspace_symbols() end, desc = "LSP Workspace Symbols" }, + + -- Migrated from Telescope + { "pp", function() Snacks.picker.smart() end, desc = "Open Project files" }, + { "gc", function() Snacks.picker.git_branches() end, desc = "Git Branches selector" }, + { "pw", function() Snacks.picker.grep_word() end, desc = "Grep word under cursor" }, + { "ps", function() Snacks.picker.grep() end, desc = "Grep provided input string" }, + { "rc", function() Snacks.picker.git_files({ cwd = vim.fn.expand("~/.dotfiles") }) end, desc = "Search Files in .dotfiles directory" }, + { "rn", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Search Files in nvim config directory" }, + { "rp", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") .. "/lua/plugins" }) end, desc = "Search Neovim plugins" }, + { "rs", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") .. "/lua/scratchs" }) end, desc = "Search Neovim Scratchs files" }, + { "ph", function() Snacks.picker.help() end, desc = "Neovim Help" }, + { "pe", function() Snacks.picker.buffers() end, desc = "Open buffers" }, + -- { "pr", function() Snacks.picker.treesitter() end, desc = "Treesitter buffer elements" }, -- Check if treesitter exists + { "bb", function() Snacks.explorer() end, desc = "Current directory" }, + { "bp", function() Snacks.explorer() end, desc = "Project directory" }, + -- { "gs", function() Snacks.picker.git_status() end, desc = "Git status" }, -- Already in default + { "ve", function() Snacks.picker.diagnostics() end, desc = "Diagnostic of the buffer" }, + { "po", function() Snacks.picker.git_files({ cwd = "./api-specification" }) end, desc = "Openapi directory" }, + -- { "pm", "gateway", { desc = "Graphql mutations and queries" }) -- Skipped + }, +} -- cgit v1.2.3