Files
dotfiles/nvim/lua/plugins/snacks.lua
d0zingcat f9808c01a0 refactor(nvim): simplify fold config and remove statuscol
Switch to manual folding, remove treesitter foldexpr and statuscol.nvim dependency, simplify snacks statuscolumn config.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-04 21:35:08 +08:00

63 lines
1.6 KiB
Lua

-- snacks.lua - folke's modern utility library
-- Provides: notifications, bigfile handling, quickfile, statuscolumn, word highlighting
return {
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
opts = {
-- Bigfile optimization
bigfile = {
enabled = true,
notify = true,
line_length = 1000,
},
-- Notifications (replaces nvim-notify)
notifier = {
enabled = true,
timeout = 3000,
history = true,
render = "compact",
level = vim.log.levels.INFO,
},
-- Quick file navigation
quickfile = {
enabled = true,
exclude = { "gitcommit", "gitrebase" },
},
-- Enhanced statuscolumn
statuscolumn = {
enabled = false,
},
-- Word highlighting and jumping
words = {
enabled = true,
debounce = 100,
notify_end = false,
jumplist = true,
mappings = {
["]w"] = "next",
["[w"] = "prev",
},
},
},
keys = {
{ "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" },
{ "<leader>q", function() Snacks.quickfile() end, desc = "Quick File" },
{ "]w", function() Snacks.words.jump() end, desc = "Next Word Reference" },
{ "[w", function() Snacks.words.jump(-1) end, desc = "Prev Word Reference" },
},
init = function()
-- Override vim.notify
vim.notify = function(msg, level, opts)
Snacks.notifier.notify(msg, level, opts)
end
end,
},
}