return { "folke/snacks.nvim", priority = 1000, lazy = false, ---@type snacks.Config opts = { bigfile = { enabled = true }, dashboard = { enabled = true }, explorer = { enabled = true, auto_close = true }, indent = { enabled = false }, input = { enabled = true }, picker = { enabled = true }, notifier = { enabled = true }, quickfile = { enabled = true }, scope = { enabled = true }, scroll = { enabled = false }, statuscolumn = { enabled = true }, words = { enabled = false }, }, keys = { { ",", function() Snacks.picker.buffers() end, desc = "Buffers" }, { ":", function() Snacks.picker.command_history() end, desc = "Command History" }, { "n", function() Snacks.picker.notifications() end, desc = "Notification History" }, { "e", function() Snacks.explorer() end, desc = "Snack File Explorer" }, { "", function() Snacks.picker.smart() end, desc = "Smart Find Files" }, { "fg", function() Snacks.picker.git_files() end, desc = "Find Git Files" }, { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, { "n", function() Snacks.picker.notifications() end, desc = "Show history notifications" }, -- 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" }, { "gB", function() Snacks.gitbrowse() end, desc = "Git Browse", mode = { "n", "v" } }, { "gg", function() Snacks.lazygit() end, desc = "Lazygit" }, -- 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" }, }, -- 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" }, -- Other { "]]", function() Snacks.words.jump(vim.v.count1) end, desc = "Next Reference", mode = { "n", "t" } }, { "[[", function() Snacks.words.jump(-vim.v.count1) end, desc = "Prev Reference", mode = { "n", "t" } }, { "", function() Snacks.terminal() end, desc = "Toggle Terminal" }, { ".", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" }, { "S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" }, }, }