From 6d38e5e83eb952bbece2cd2cab47aba6b370aa00 Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.uk>
Date: Sun, 29 Oct 2023 23:13:08 +0000
Subject: [PATCH] fix(nvim): configure undodir

---
 config/neovim/lua/opdavies/options.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/config/neovim/lua/opdavies/options.lua b/config/neovim/lua/opdavies/options.lua
index f8c17852..f6843bad 100644
--- a/config/neovim/lua/opdavies/options.lua
+++ b/config/neovim/lua/opdavies/options.lua
@@ -119,7 +119,7 @@ end
 local function set_vim_o()
   local settings = {
     autoindent = true,
-    backup = true,
+    backup = false,
     breakindent = true,
     conceallevel = 0,
     cursorline = true,
@@ -149,6 +149,8 @@ local function set_vim_o()
     tabstop = 2,
     termguicolors = true,
     textwidth = 0,
+    undodir = os.getenv("HOME") .. "/.vim/undodir",
+    undofile = true,
     updatetime = 1000,
     wrap = false,
   }