return { 'folke/snacks.nvim', priority = 1000, version = false, lazy = false, ---@type snacks.Config opts = { -- your configuration comes here -- or leave it empty to use the default settings -- refer to the configuration section below bigfile = { enabled = true }, notifier = { enabled = false }, quickfile = { enabled = true }, statuscolumn = { enabled = true }, words = { enabled = true }, dashboard = { sections = { { section = 'header' }, { section = 'keys', gap = 1, padding = 1 }, { title = 'Sessions', padding = 1 }, { pane = 1, icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 }, { pane = 2, icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 }, { pane = 2, icon = ' ', title = 'Git Status', section = 'terminal', cmd = 'output=$(CLICOLOR=1 GH_FORCE_TTY=1 gh pr status 2>&1) && echo -e "$output" || true', height = 30, width = 80, padding = 1, ttl = 5 * 60, indent = 3, }, { section = 'startup' }, }, }, picker = { matcher = { frecency = true }, win = { input = { keys = { [''] = { 'edit_tab', mode = { 'n', 'i' } }, }, }, }, } }, keys = { { 'g', function() Snacks.lazygit() end, desc = 'Lazygit', }, { 'gf', function() Snacks.lazygit.log_file() end, desc = 'Lazygit Current File History', }, { 'gl', function() Snacks.lazygit.log() end, desc = 'Lazygit Log (cwd)', }, { 'm', function() Snacks.words.jump(vim.v.count1) end, desc = 'Next Reference', mode = { 'n' }, }, { '', function() Snacks.words.jump(-vim.v.count1) end, desc = 'Prev Reference', mode = { 'n' }, }, -- Top Pickers & Explorer { '', function() Snacks.picker.smart() end, desc = 'Smart Find Files' }, { 'b', function() Snacks.picker.buffers() end, desc = 'Buffers' }, { 'l', 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" }, -- { "f", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" }, { 'f', function() Snacks.picker.files() end, desc = 'Find Files' }, { 'g', function() Snacks.picker.git_files() end, desc = 'Find Git Files' }, { 'p', function() Snacks.picker.projects() end, desc = 'Projects' }, { 'o', function() Snacks.picker.recent() end, desc = 'Recent' }, { 'i', function() Snacks.picker.recent({ filter = { cwd = true } }) end, desc = 'Recent in cwd' }, -- git -- { "gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" }, -- { "gl", function() Snacks.picker.git_log() end, desc = "Git Log" }, -- { "gL", function() Snacks.picker.git_log_line() end, desc = "Git Log Line" }, -- { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, -- { "gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" }, -- { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" }, -- { "gf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" }, -- 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" }, { 'd', 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" }, -- { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, -- { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, -- { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, -- { "v", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, { 'V', function() Snacks.picker.diagnostics_buffer() end, desc = 'Buffer Diagnostics' }, { 'sh', function() Snacks.picker.help() end, desc = 'Help Pages' }, { 'sH', function() Snacks.picker.highlights() end, desc = 'Highlights' }, { 'si', function() Snacks.picker.icons() end, desc = 'Icons' }, { 'j', function() Snacks.picker.jumps() end, desc = 'Jumps' }, { "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" }, { "sM", function() Snacks.picker.man() end, desc = "Man Pages" }, { "sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" }, { "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" }, -- { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, -- LSP { 'd', function() Snacks.picker.lsp_definitions() end, desc = 'Goto Definition' }, { 'D', function() Snacks.picker.lsp_declarations() end, desc = 'Goto Declaration' }, { 'r', function() Snacks.picker.lsp_references() end, nowait = true, desc = 'References' }, { 'I', function() Snacks.picker.lsp_implementations() end, desc = 'Goto Implementation' }, { 'e', function() Snacks.picker.lsp_type_definitions() end, desc = 'Goto T[y]pe Definition' }, { '', function() Snacks.picker.lsp_symbols() end, desc = 'LSP Symbols' }, { 'sS', function() Snacks.picker.lsp_workspace_symbols() end, desc = 'LSP Workspace Symbols' }, }, }