2025-10-11 17:18:56 +11:00
|
|
|
return {
|
|
|
|
|
{
|
|
|
|
|
"folke/snacks.nvim",
|
2025-10-22 14:20:19 +11:00
|
|
|
---@type snacks.Config
|
2025-10-11 17:18:56 +11:00
|
|
|
opts = {
|
|
|
|
|
-- image = {},
|
|
|
|
|
indent = {
|
|
|
|
|
chunk = {
|
|
|
|
|
enabled = true,
|
|
|
|
|
priority = 200,
|
|
|
|
|
hl = "SnacksIndentChunk", ---@type string|string[] hl group for chunk scopes
|
|
|
|
|
char = {
|
|
|
|
|
-- corner_top = "┌",
|
|
|
|
|
-- corner_bottom = "└",
|
|
|
|
|
corner_top = "╭",
|
|
|
|
|
corner_bottom = "╰",
|
|
|
|
|
horizontal = "─",
|
|
|
|
|
vertical = "│",
|
|
|
|
|
arrow = ">",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
dashboard = {
|
|
|
|
|
preset = {
|
|
|
|
|
-- stylua: ignore
|
|
|
|
|
---@type snacks.dashboard.Item[]
|
|
|
|
|
keys = {
|
|
|
|
|
{ icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" },
|
|
|
|
|
{ icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" },
|
|
|
|
|
-- { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" },
|
|
|
|
|
{ icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" },
|
|
|
|
|
{ icon = " ", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" },
|
|
|
|
|
{ icon = " ", key = "d", desc = "Dotfiles", action = ":lua Snacks.picker.files({cwd = vim.fn.expand('~/.config'),hidden=true})" },
|
|
|
|
|
{ icon = " ", key = "s", desc = "Restore Session", section = "session" },
|
|
|
|
|
{ icon = " ", key = "x", desc = "Lazy Extras", action = ":LazyExtras" },
|
|
|
|
|
{ icon = " ", key = "l", desc = "Lazy", action = ":Lazy" },
|
2025-10-17 20:03:30 +11:00
|
|
|
{ icon = " ", key = "q", desc = "Quit", action = ":qa" },
|
2025-10-11 17:18:56 +11:00
|
|
|
},
|
|
|
|
|
header = [[
|
|
|
|
|
███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗
|
|
|
|
|
████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║
|
|
|
|
|
██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║
|
|
|
|
|
██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║
|
|
|
|
|
██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║
|
|
|
|
|
╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝]],
|
|
|
|
|
},
|
|
|
|
|
sections = {
|
|
|
|
|
-- { section = "terminal", cmd = "fortune -s | cowsay", hl = "header", padding = 1, indent = 8 },
|
|
|
|
|
{ section = "header" },
|
|
|
|
|
{ title = "Projects", padding = 1 },
|
|
|
|
|
{ section = "projects", padding = 1, gap = 1 },
|
|
|
|
|
{ title = "Options", padding = 1 },
|
|
|
|
|
{ section = "keys", gap = 1 },
|
2025-10-17 20:03:30 +11:00
|
|
|
{ section = "startup" },
|
2025-10-11 17:18:56 +11:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
picker = {
|
|
|
|
|
matcher = {
|
|
|
|
|
frecency = true,
|
|
|
|
|
},
|
|
|
|
|
-- debug = {
|
|
|
|
|
-- scores = true,
|
|
|
|
|
-- },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
-- stylua: ignore
|
|
|
|
|
keys = {
|
|
|
|
|
{ "<c-/>", function() Snacks.terminal(nil, { cwd = vim.fn.expand("%:p:h") }) end, desc = "Toggle Terminal" },
|
|
|
|
|
{ "]]", 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" } },
|
2025-10-17 20:03:30 +11:00
|
|
|
{ "<leader>E", function() Snacks.explorer({ cwd = LazyVim.root() }) end, desc = "Explorer Snacks (root dir)", },
|
|
|
|
|
{ "<leader>e", function() Snacks.explorer() end, desc = "Explorer Snacks (cwd)", },
|
2025-10-11 17:18:56 +11:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|