return { 'folke/snacks.nvim', priority = 1000, lazy = false, ---@type snacks.Config opts = { styles = { input = { row = 0.4 }, }, -- bigfile = {}, -- dashboard = {}, gitbrowse = {}, image = {}, -- indent = { -- scope = { enabled = false }, -- }, input = {}, notifier = { ---@type snacks.notifier.style style = 'compact', filter = function(notif) local exact_filter = { 'No information available', 'No code actions available' } local contains_filter = { 'fewer lines', 'lines indented', 'lines yanked', 'more lines', 'E486:' } for _, msg in ipairs(exact_filter) do if notif.msg == msg then return false end end for _, msg in ipairs(contains_filter) do if string.find(notif.msg, msg) then return false end end return true end, }, picker = {}, quickfile = {}, scratch = { filekey = { branch = false }, ft = function() return 'markdown' end, win = { style = 'scratch', keys = { ['reset'] = { '', function(self) local file = vim.api.nvim_buf_get_name(self.buf) Snacks.bufdelete.delete(self.buf) os.remove(file) local name = 'scratch.' .. vim.fn.fnamemodify(file, ':e') Snacks.notify.info('Deleted ' .. name) end, desc = 'Reset', mode = { 'n', 'x' }, }, }, }, }, -- scroll = { -- animate = { -- duration = { step = 15, total = 50 }, -- easing = 'linear', -- }, -- }, terminal = {}, }, keys = { { 'go', function() Snacks.gitbrowse.open() end, desc = '[G]it [O]pen', }, { 'gc', function() Snacks.gitbrowse.open({ open = function(url) vim.fn.setreg('+', url) end, }) end, desc = '[G]it [O]pen', }, { 'ri', function() Snacks.image.hover() end, desc = '[R]ender [I]mage', }, { 'nd', function() Snacks.notifier.hide() end, desc = '[N]otification [D]ismiss All', }, { 'nh', function() Snacks.notifier.show_history() end, desc = '[N]otification [H]istory', }, { 'sp', function() Snacks.picker.pickers({ layout = 'telescope' }) end, desc = '[S]how [P]ickers', }, { 'fs', function() Snacks.picker.files({ layout = 'telescope', hidden = true, follow = true, }) end, desc = '[F]ile [S]ystem', }, { 'lv', function() Snacks.picker.grep({ layout = 'telescope', hidden = true, follow = true, }) end, desc = '[L]ive [G]rep', }, { 'gi', function() Snacks.picker.lsp_implementations() end, { desc = '[G]oto [I]mplementations' }, }, { 'gt', function() Snacks.picker.lsp_type_definitions() end, { desc = '[G]oto [T]ype Definitions' }, }, { 'ds', function() Snacks.picker.lsp_symbols({ layout = 'telescope' }) end, desc = '[D]ocument [S]ymbols', }, { 'ps', function() Snacks.picker.lsp_workspace_symbols({ layout = 'telescope' }) end, desc = '[P]roject [S]ymbols', }, { 'di', function() Snacks.picker.diagnostics({ layout = 'telescope' }) end, desc = '[Di]agnostics', }, { 'dl', function() Snacks.picker.diagnostics_buffer({ layout = 'telescope' }) end, desc = '[D]iagnostics [L]ocal', }, { 'fh', function() Snacks.picker.help({ layout = 'telescope' }) end, desc = '[F]ind [H]elp', }, { 'hi', function() Snacks.picker.highlights({ layout = 'telescope', hidden = true, follow = true, }) end, desc = '[Hi]light Groups', }, { 'si', function() Snacks.picker.icons({ layout = 'select' }) end, desc = '[S]earch [I]cons', }, { 'sk', function() Snacks.picker.keymaps({ layout = 'dropdown' }) end, desc = '[S]earch [K]eymaps', }, { 'th', function() Snacks.picker.colorschemes({ layout = 'dropdown' }) end, desc = '[T]hemes [P]icker', }, { 'rn', function() Snacks.rename.rename_file() end, desc = '[R]e[n]ame', }, { '.', function() Snacks.scratch() end, desc = 'Toggle Scratch Buffer', }, { 'S', function() Snacks.scratch.select() end, desc = 'Select [S]cratch Buffer', }, { 'nt', function() Snacks.terminal.open() end, desc = '[N]ew [T]erminal', }, { 'T', function() Snacks.terminal.toggle() end, desc = 'Toggle [T]erminal', }, }, }