diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua index 83b8f35..51060eb 100644 --- a/dot_config/nvim/init.lua +++ b/dot_config/nvim/init.lua @@ -20,6 +20,7 @@ vim.keymap.set("n", "", "zz") vim.keymap.set("n", "w", ":update") vim.keymap.set("n", "", ":Pick files") vim.keymap.set("n", "h", ":Pick help") +vim.keymap.set("n", "cz", function() require("chezmoi.pick").mini() end) -- Pick from chezmoi managed files vim.pack.add( { @@ -38,8 +39,8 @@ vim.pack.add( { src = "https://github.com/rebelot/kanagawa.nvim" }, -- Theme { src = "https://github.com/mfussenegger/nvim-lint" }, -- Linter { src = "https://github.com/rachartier/tiny-inline-diagnostic.nvim" }, -- Inline diagnostics - { src = "https://github.com/j-hui/fidget.nvim" }, -- LSP Status Popup - { src = "https://github.com/xvzc/chezmoi.nvim" }, -- Chezmoi dotfiles manager + { src = "https://github.com/j-hui/fidget.nvim" }, -- LSP Status Popup + { src = "https://github.com/xvzc/chezmoi.nvim" }, -- Chezmoi dotfiles manager } ) @@ -91,5 +92,38 @@ vim.diagnostic.config({ virtual_text = false }) -- Chezmoi require("chezmoi").setup { - +edit = { + watch = false, + force = false, + ignore_patterns = { + "run_onchange_.*", + "run_once_.*", + "%.chezmoiignore", + "%.chezmoitemplate", + -- Add custom patterns here + }, + }, + events = { + on_open = { + notification = { + enable = true, + msg = "Opened a chezmoi-managed file", + opts = {}, + }, + }, + on_watch = { + notification = { + enable = true, + msg = "This file will be automatically applied", + opts = {}, + }, + }, + on_apply = { + notification = { + enable = true, + msg = "Successfully applied", + opts = {}, + }, + }, + }, }