Add chezmoi.vim

This commit is contained in:
Maximilian Friedersdorff 2025-10-01 09:12:55 +01:00
parent f5ed7c0343
commit 662418b0b9

View file

@ -3,35 +3,45 @@ local pick_chezmoi = function()
end end
return { return {
"xvzc/chezmoi.nvim", {
dependencies = { "nvim-lua/plenary.nvim" }, -- highlighting for chezmoi files template files
keys = { "alker0/chezmoi.vim",
{ init = function()
"<leader>sz", vim.g["chezmoi#use_tmp_buffer"] = 1
pick_chezmoi, vim.g["chezmoi#source_dir_path"] = os.getenv("HOME") .. "/.local/share/chezmoi"
desc = "Chezmoi", end,
},
}, },
opts = { {
edit = { "xvzc/chezmoi.nvim",
watch = false, dependencies = { "nvim-lua/plenary.nvim" },
force = false, keys = {
{
"<leader>sz",
pick_chezmoi,
desc = "Chezmoi",
},
}, },
notification = { opts = {
on_open = true, edit = {
on_apply = true, watch = false,
on_watch = false, force = false,
}, },
telescope = { notification = {
select = { "<CR>" }, on_open = true,
on_apply = true,
on_watch = false,
},
telescope = {
select = { "<CR>" },
},
}, },
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,
}, },
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,
} }