From 0dbeeb530b92eb63734c45d9e8f32f66b5336286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dai=20L=C3=B3pez?= Date: Thu, 20 Feb 2025 22:57:21 -0600 Subject: [PATCH] feat(chezmoi): add snacks dashboard integration for chezmoi files Since now Snacks.dashboard is the default dashboard for LazyVim we add chezmoi files integration to it --- lua/lazyvim/plugins/extras/util/chezmoi.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lua/lazyvim/plugins/extras/util/chezmoi.lua b/lua/lazyvim/plugins/extras/util/chezmoi.lua index cffa6749..06a33f6f 100644 --- a/lua/lazyvim/plugins/extras/util/chezmoi.lua +++ b/lua/lazyvim/plugins/extras/util/chezmoi.lua @@ -96,6 +96,24 @@ return { }) end, }, + { + "folke/snacks.nvim", + opts = function(_, opts) + local projects = { + icon = "", + key = "c", + desc = "Config", + action = pick_chezmoi, + } + + for i = #opts.dashboard.preset.keys, 1, -1 do + if opts.dashboard.preset.keys[i].key == "c" then + table.remove(opts.dashboard.preset.keys, i) + table.insert(opts.dashboard.preset.keys, i, projects) + end + end + end, + }, { "nvimdev/dashboard-nvim", optional = true,