From e581acb6521f34668154e594c367dc472471a438 Mon Sep 17 00:00:00 2001 From: Robert Morrison Date: Fri, 10 Apr 2026 02:43:32 +0100 Subject: [PATCH] feat(snacks): Add snacks \# TODO: - configure more of the things snacks offers - figure out how to make opening a project just open the directory - Then I can use my normal neo-tree method for choosing what to edit. - Hopefully this is an option and not something that requires modifying plugin code. --- lua/plugins/spec/snacks.lua | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 lua/plugins/spec/snacks.lua diff --git a/lua/plugins/spec/snacks.lua b/lua/plugins/spec/snacks.lua new file mode 100644 index 0000000..419d3fa --- /dev/null +++ b/lua/plugins/spec/snacks.lua @@ -0,0 +1,62 @@ +---@module "lazy.nvim" +---@type LazySpec[] +return { + { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + ---@module "snacks" + ---@type snacks.Config + opts = { + bufdelete = { + enabled = true + }, + ---@type snacks.dashboard.Config + dashboard = + { + sections = { + { section = "header"}, + { + icon = " ", + title = "keymaps", + section = "keys", + indent = 2, + padding = 1, + }, + { + icon = " ", + title = "Recent Files", + section = "recent_files", + indent = 2, + padding = 1, + }, + { + icon = " ", + title = "Projects", + section = "projects", + indent = 2, + padding = 1, + }, + { section = "startup"}, + }, + formats = {} + }, + indent = {enabled = true}, + rename = {enabled = true}, + styles = { + notification ={ + wo = { wrap = true } + } + } + }, + keys = { + {"bd", + function () + require("snacks").bufdelete() + end, + desc = "Delete current buffer", + mode = "n" + } + } + } +}