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
|
||||
|
||||
return {
|
||||
"xvzc/chezmoi.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>sz",
|
||||
pick_chezmoi,
|
||||
desc = "Chezmoi",
|
||||
},
|
||||
{
|
||||
-- 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,
|
||||
},
|
||||
opts = {
|
||||
edit = {
|
||||
watch = false,
|
||||
force = false,
|
||||
{
|
||||
"xvzc/chezmoi.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>sz",
|
||||
pick_chezmoi,
|
||||
desc = "Chezmoi",
|
||||
},
|
||||
},
|
||||
notification = {
|
||||
on_open = true,
|
||||
on_apply = true,
|
||||
on_watch = false,
|
||||
},
|
||||
telescope = {
|
||||
select = { "<CR>" },
|
||||
opts = {
|
||||
edit = {
|
||||
watch = false,
|
||||
force = false,
|
||||
},
|
||||
notification = {
|
||||
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