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