Add chezmoi.vim
This commit is contained in:
parent
f5ed7c0343
commit
662418b0b9
1 changed files with 37 additions and 27 deletions
|
|
@ -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,
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue