feat(nvim): Use non-lazyvim dashboard header

This commit is contained in:
histalek 2025-01-18 16:09:12 +01:00
parent 7b113e4196
commit 58e231ef78
Signed by: histalek
SSH key fingerprint: SHA256:6a6N2Wzk73nwURUHC/ubbCyqdB6yfie0Jv/NGvRcsIE

View file

@ -1,46 +1,54 @@
return { return {
"folke/snacks.nvim", "folke/snacks.nvim",
dependencies = { "echasnovski/mini.icons", "nvim-tree/nvim-web-devicons"}, dependencies = { "echasnovski/mini.icons", "nvim-tree/nvim-web-devicons" },
priority = 1000, priority = 1000,
lazy = false, lazy = false,
---@type snacks.Config ---@type snacks.Config
opts = { opts = {
indent = { enabled = true }, indent = { enabled = true },
input = { enabled = true }, input = { enabled = true },
lazygit = { enabled = false }, lazygit = { enabled = false },
notifier = { enabled = true }, notifier = { enabled = true },
scope = { enabled = true }, scope = { enabled = true },
scroll = { enabled = true }, scroll = { enabled = true },
statuscolumn = { enabled = false }, statuscolumn = { enabled = false },
words = { enabled = true }, words = { enabled = true },
dashboard = { dashboard = {
preset = { preset = {
header = [[ header = [[
Z
Z
z
z
]],
-- 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 = "s", desc = "Restore Session", section = "session" }, ]],
{ icon = "󰒲 ", key = "l", desc = "Lazy", action = ":Lazy" }, -- stylua: ignore
{ icon = "", key = "q", desc = "Quit", action = ":qa" }, 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 = "s", desc = "Restore Session", section = "session" },
{ icon = "󰒲 ", key = "l", desc = "Lazy", action = ":Lazy" },
{ icon = "", key = "q", desc = "Quit", action = ":qa" },
},
},
}, },
},
}, },
}, -- stylua: ignore
-- stylua: ignore keys = {
keys = { { "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" },
{ "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" }, { "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" },
{ "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" }, },
},
} }