return { "folke/snacks.nvim", ---@type snacks.Config opts = { picker = { layout = { preview = "main", preset = "ivy", }, }, terminal = { win = { position = "float", border = "rounded", height = 0.8, width = 0.6, } }, }, keys = { { "`", function() Snacks.explorer( { auto_close = true, layout = { preset = "sidebar", preview = "main" }, } ) end, desc = "File Explorer" }, { "s", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" }, { "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" }, { "", function() Snacks.picker.smart() end, desc = "Smart Find Files" }, { "b", 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" }, { "u", function() Snacks.picker.undo() end, desc = "Undo History" }, { '"', function() Snacks.picker.registers() end, desc = "Registers" }, { "gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" }, { "gl", function() Snacks.picker.git_log() end, desc = "Git Log" }, { "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" }, { "", function() Snacks.terminal.toggle() end, desc = "Terminal Toggle", mode = { "n", "i", "t" } }, } }