From 0bb9c29b25d7c7266004e3698ebef16292ec07c7 Mon Sep 17 00:00:00 2001 From: Feliche-Demian Netliukh <51330172+Demianeen@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:42:19 +0100 Subject: [PATCH] fix(extras): run chezmoi autocmd without configuring chezmoi --- lua/lazyvim/plugins/extras/util/chezmoi.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/chezmoi.lua b/lua/lazyvim/plugins/extras/util/chezmoi.lua index a4b6fcd2..dd14271f 100644 --- a/lua/lazyvim/plugins/extras/util/chezmoi.lua +++ b/lua/lazyvim/plugins/extras/util/chezmoi.lua @@ -1,3 +1,4 @@ +vim.notify("Hello") return { { -- highlighting for chezmoi files template files @@ -38,7 +39,7 @@ return { select = { "" }, }, }, - config = function(_, opts) + init = function() -- run chezmoi edit on file enter vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/*" }, @@ -46,7 +47,8 @@ return { vim.schedule(require("chezmoi.commands.__edit").watch) end, }) - + end, + config = function(_, opts) require("chezmoi").setup(opts) end, },