2025-02-12 11:49:02 +01:00
|
|
|
return {
|
2025-02-13 09:04:17 +01:00
|
|
|
'folke/snacks.nvim',
|
|
|
|
commit = 'b773368f8aa6e84a68e979f0e335d23de71f405a',
|
2025-02-12 11:49:02 +01:00
|
|
|
lazy = false,
|
|
|
|
priority = 1000,
|
|
|
|
|
|
|
|
keys = {
|
2025-02-14 10:10:32 +01:00
|
|
|
-- Buffer Management
|
2025-02-12 11:49:02 +01:00
|
|
|
{
|
2025-02-13 09:04:17 +01:00
|
|
|
'<c-w>d',
|
|
|
|
function()
|
|
|
|
require('snacks').bufdelete()
|
|
|
|
end,
|
|
|
|
desc = 'Delete Current Buffer',
|
2025-02-12 11:49:02 +01:00
|
|
|
},
|
|
|
|
|
2025-02-14 10:10:32 +01:00
|
|
|
-- UX: Zen Mode
|
2025-02-12 11:49:02 +01:00
|
|
|
--- <leader>u
|
|
|
|
{
|
2025-02-13 09:04:17 +01:00
|
|
|
'<leader>ud',
|
|
|
|
function()
|
|
|
|
require('snacks').dim()
|
|
|
|
end,
|
|
|
|
desc = '[U]I [D]imming',
|
2025-02-12 11:49:02 +01:00
|
|
|
},
|
|
|
|
{
|
2025-02-13 09:04:17 +01:00
|
|
|
'<leader>us',
|
|
|
|
function()
|
|
|
|
require('snacks').dim.disable()
|
|
|
|
end,
|
|
|
|
desc = 'Disable [U]I Dimming',
|
2025-02-12 11:49:02 +01:00
|
|
|
},
|
|
|
|
{
|
2025-02-13 09:04:17 +01:00
|
|
|
'<leader>uz',
|
|
|
|
function()
|
|
|
|
require('snacks').zen()
|
|
|
|
end,
|
|
|
|
desc = '[U]I [Z]en Mode',
|
2025-02-12 11:49:02 +01:00
|
|
|
},
|
2025-02-14 10:10:32 +01:00
|
|
|
|
|
|
|
-- Picker
|
|
|
|
--- Accessibility
|
|
|
|
{
|
|
|
|
'<leader>s?',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.pickers()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch Pickers',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'<leader>sh',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.help()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch [H]elp Tags',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'<leader>sk',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.keymaps()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch [K]eymaps',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'<leader>sc',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.commands()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch [C]ommands',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'<leader>sm',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.man()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch [M]anpages',
|
|
|
|
},
|
|
|
|
|
|
|
|
--- Grep
|
|
|
|
{
|
|
|
|
'<leader>sg',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.grep()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch w/[G]rep',
|
|
|
|
},
|
|
|
|
|
|
|
|
--- Buffer / File Search
|
|
|
|
{
|
|
|
|
'<leader>sb',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.buffers()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch [B]uffers',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'<leader>sf',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.files()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch [F]iles',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'<leader>st',
|
|
|
|
function()
|
|
|
|
require('snacks').explorer()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch File[T]ree',
|
|
|
|
},
|
|
|
|
|
|
|
|
--- Git: "VCS" -> "v"
|
|
|
|
{
|
|
|
|
'<leader>svd',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.git_diff()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch Git [L]og',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'<leader>svl',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.git_log_file()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch Git [L]og',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'<leader>svs',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.git_status()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch Git [S]tatus',
|
|
|
|
},
|
|
|
|
|
|
|
|
--- Debug
|
|
|
|
{
|
|
|
|
'<leader>sd',
|
|
|
|
function()
|
|
|
|
require('snacks').picker.diagnostics_buffer()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch [D]iagnostics',
|
|
|
|
},
|
|
|
|
|
|
|
|
--- Vim
|
|
|
|
{
|
|
|
|
"<leader>s'",
|
|
|
|
function()
|
|
|
|
require('snacks').picker.registers()
|
|
|
|
end,
|
|
|
|
'n',
|
|
|
|
desc = '[S]earch Vim Registers',
|
|
|
|
},
|
2025-02-12 11:49:02 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
opts = {
|
|
|
|
-- Big Files: Disable LSPs for Very Big Files
|
|
|
|
bigfile = {},
|
|
|
|
|
|
|
|
-- Dashboard: Pretty Startup
|
|
|
|
dashboard = {},
|
|
|
|
|
|
|
|
-- Dim: Focus on the Active Scope
|
|
|
|
dim = {},
|
|
|
|
|
2025-02-14 10:10:32 +01:00
|
|
|
-- Picker
|
|
|
|
picker = {
|
|
|
|
--sources = {
|
|
|
|
-- ['projections'] = {
|
|
|
|
-- preview = 'preview',
|
|
|
|
-- format = "text",
|
|
|
|
-- },
|
|
|
|
--},
|
|
|
|
},
|
|
|
|
|
2025-02-12 11:49:02 +01:00
|
|
|
-- Indent: Indentation Guides
|
|
|
|
indent = {
|
|
|
|
animate = {
|
|
|
|
enabled = false,
|
2025-02-13 09:04:17 +01:00
|
|
|
},
|
2025-02-12 11:49:02 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
-- Input: Better vim.ui.input
|
|
|
|
input = { enabled = true },
|
|
|
|
|
|
|
|
-- TODO: git (for the blame line)
|
|
|
|
-- TODO: gitbrowse
|
|
|
|
-- TODO: lazygit
|
|
|
|
|
|
|
|
-- Notifier: Prettier notifications
|
|
|
|
--notifier = { enabled = true },
|
|
|
|
|
|
|
|
-- Quickfile: Load files first (aka fast) when doing 'nvim file.txt'
|
|
|
|
quickfile = { enabled = true },
|
|
|
|
|
|
|
|
-- TODO: 'rename' w/nvim-tree integration
|
|
|
|
|
|
|
|
-- "Zen Mode"
|
|
|
|
zen = { enabled = true },
|
|
|
|
},
|
|
|
|
}
|