From 7f9ce5925eaa28657d40ed9f58137d29ba657080 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Tue, 1 Aug 2023 11:05:41 -0400 Subject: [PATCH] add undodir to hopefully fix short undo history seems like undo history was being lost after committing to git --- modules/common/neovim/config/misc.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/common/neovim/config/misc.nix b/modules/common/neovim/config/misc.nix index 906016b..2328329 100644 --- a/modules/common/neovim/config/misc.nix +++ b/modules/common/neovim/config/misc.nix @@ -52,7 +52,9 @@ vim.o.backup = true; # Easier to recover and more secure vim.bo.swapfile = false; # Instead of swaps, create backups vim.bo.undofile = true; # Keeps undos after quit - vim.o.backupdir = dsl.rawLua ''vim.fn.stdpath("cache") .. "/backup"''; + vim.o.backupdir = + dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/backup//")''; + vim.o.undodir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/undo//")''; # Required for nvim-cmp completion vim.opt.completeopt = [ "menu" "menuone" "noselect" ];