From bd5ec65f8b5ca740b4b59429aec076632c81f938 Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.uk>
Date: Tue, 27 Dec 2022 16:36:56 +0000
Subject: [PATCH] chore(nvim): configure backup settings

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

diff --git a/config/neovim/lua/opdavies/options.lua b/config/neovim/lua/opdavies/options.lua
index 8073ced4..622ec372 100644
--- a/config/neovim/lua/opdavies/options.lua
+++ b/config/neovim/lua/opdavies/options.lua
@@ -117,6 +117,7 @@ end
 local function set_vim_o()
   local settings = {
     autoindent = true,
+    backup = true,
     breakindent = true,
     conceallevel = 0,
     cursorline = true,
@@ -153,6 +154,7 @@ local function set_vim_o()
     vim.o[key] = value
   end
 
+  vim.opt.backupdir:remove('.') -- keep backups out of the current directory
   vim.opt.clipboard:append "unnamedplus"
   vim.opt.completeopt = { "menu", "menuone", "noselect" }
   vim.opt.laststatus = 3