From 3f3d6a23d585b727c531fc53f8d90c5bbce7ea39 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 1 Oct 2025 09:10:39 +0100 Subject: [PATCH] Add chezmoi config --- .../nvim/lua/custom/plugins/chezmoi.lua | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 home/dot_config/nvim/lua/custom/plugins/chezmoi.lua diff --git a/home/dot_config/nvim/lua/custom/plugins/chezmoi.lua b/home/dot_config/nvim/lua/custom/plugins/chezmoi.lua new file mode 100644 index 0000000..076be45 --- /dev/null +++ b/home/dot_config/nvim/lua/custom/plugins/chezmoi.lua @@ -0,0 +1,37 @@ +local pick_chezmoi = function() + require("telescope").extensions.chezmoi.find_files() +end + +return { + "xvzc/chezmoi.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + keys = { + { + "sz", + pick_chezmoi, + desc = "Chezmoi", + }, + }, + opts = { + edit = { + watch = false, + force = false, + }, + notification = { + on_open = true, + on_apply = true, + on_watch = false, + }, + telescope = { + select = { "" }, + }, + }, + init = function() + vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { + pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/*" }, + callback = function() + vim.schedule(require("chezmoi.commands.__edit").watch) + end, + }) + end, +}