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 }, indent = { indent = { hl = 'CmpItemKindNull', only_scope = false, only_current = false, }, enabled = true, animate = { enabled = false, }, scope = { enabled = false, }, chunk = { enabled = false, hl = 'Debug', }, }, dashboard = { sections = { { section = 'header' }, { icon = ' ', title = 'Keymaps', section = 'keys', indent = 2, padding = 1 }, { icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 }, { icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 }, { section = 'startup' }, }, }, picker = { matcher = { frecency = true, cwd_bonus = true, filename_bonus = true, }, win = { input = { keys = { [''] = { 'edit_tab', mode = { 'n', 'i' } }, }, }, }, formatters = { file = { truncate = 100, filename_first = true, }, }, }, }, 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 { 'nb', function() Snacks.picker.git_branches() end, desc = 'Git Branches', }, { 'nl', function() Snacks.picker.git_log() end, desc = 'Git Log', }, { 'nL', function() Snacks.picker.git_log_line() end, desc = 'Git Log Line', }, { 'ns', function() Snacks.picker.git_status() end, desc = 'Git Status', }, { 'nS', function() Snacks.picker.git_stash() end, desc = 'Git Stash', }, { 'nd', function() Snacks.picker.git_diff() end, desc = 'Git Diff (Hunks)', }, { 'nf', 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', }, }, }