xvzc / chezmoi.nvim

Chezmoi plugin for neovim
MIT License
73 stars 3 forks source link

apply on save doesn't work #5

Closed azinsharaf closed 7 months ago

azinsharaf commented 7 months ago

when i save a dot file it doesn't apply the change via chezmoi. I've set it in config file.

return {
    "xvzc/chezmoi.nvim",
    dependencies = { "nvim-lua/plenary.nvim" },
    config = function()
        require("chezmoi").setup({
            -- your configurations
            {
                edit = {
                    watch = true, -- Set true to automatically apply on save.
                    force = true, -- Set true to force apply. Works only when watch = true.
                },
                notification = {
                    on_open = true, -- vim.notify when start editing chezmoi-managed file.
                    on_apply = true, -- vim.notify on apply.
                },
            },
        })
    end,
}
azinsharaf commented 7 months ago

i had to remove {} in config file. works now:

return {
    "xvzc/chezmoi.nvim",
    dependencies = { "nvim-lua/plenary.nvim" },
    config = function()
        require("chezmoi").setup({
            -- your configurations
            edit = {
                watch = true, -- Set true to automatically apply on save.
                force = true, -- Set true to force apply. Works only when watch = true.
            },
            notification = {
                on_open = true, -- vim.notify when start editing chezmoi-managed file.
                on_apply = true, -- vim.notify on apply.
            },
        })
    end,
}