From e71f78feeeb83d06dcf5c132b9399407f3fda703 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 16 Nov 2022 08:57:38 -0800 Subject: [PATCH] [vim] Explicitly specify swap and undo directories --- config/nvim/lua/configuration.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/nvim/lua/configuration.lua b/config/nvim/lua/configuration.lua index 1cd563c..2eda883 100644 --- a/config/nvim/lua/configuration.lua +++ b/config/nvim/lua/configuration.lua @@ -72,10 +72,12 @@ opt.laststatus = 2 opt.background = "dark" -- Save all this metadata while editing. -opt.swapfile = true opt.backup = true -opt.undofile = true opt.backupdir = {vim.fn.stdpath("data") .. "/backup//", "."} +opt.swapfile = true +opt.directory = {vim.fn.stdpath("data") .. "/swap//", "."} +opt.undofile = true +opt.undodir = {vim.fn.stdpath("data") .. "/undo//", "."} -- Fields to save in the Shada file. Parameters as follows: (see :help shada) -- % number of buffers to save and restore when no file argument is given