return { "folke/snacks.nvim", priority = 1000, lazy = false, ---@type snacks.Config opts = { explorer = { enabled = true, }, bufdelete = { enabled = true, }, picker = { enabled = true, }, quickfile = { enabled = true, }, }, keys = { -- explorer { "e", function() Snacks.explorer() end, desc = "File Explorer" }, -- Files { "f", "", desc = "Files" }, { "fd", function() Snacks.bufdelete() end, desc = "Delete Buffer" }, { "ff", function() Snacks.picker.files() end, desc = "Find Files" }, { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, { "fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" }, { "fr", function() Snacks.picker.recent() end, desc = "Recent" }, { "f/", function() Snacks.picker.lines() end, desc = "Grep Lines" }, -- picker { "/", function() Snacks.picker.grep() end, desc = "Grep" }, { ":", function() Snacks.picker.command_history() end, desc = "Command History" }, -- -- 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 { 'sh', function() Snacks.picker.search_history() end, desc = "Search History" }, { "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" }, { "sd", function() Snacks.picker.diagnostics_buffer() end, desc = "Buffer Diagnostics" }, { "sH", function() Snacks.picker.help() end, desc = "Help Pages" }, { "si", function() Snacks.picker.icons() end, desc = "Icons" }, { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, { "su", function() Snacks.picker.undo() end, desc = "Undo History" }, { "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" }, { "gt", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, } }