From 2e2643ce277f901a365a9fc574864ca4d1af9ddf Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 2 May 2024 10:00:26 +0200 Subject: added backupdir --- lua/user/set.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/user/set.lua b/lua/user/set.lua index 2767143..9f526f4 100644 --- a/lua/user/set.lua +++ b/lua/user/set.lua @@ -20,11 +20,16 @@ opt.smartindent = true -- Enable break indent opt.breakindent = true +local home = os.getenv("HOME") -- History settings opt.undofile = true -opt.undodir = os.getenv("HOME") .. "/.local/state/nvim" -opt.swapfile = true opt.swapfile = true +opt.backup = true +opt.writebackup = true +opt.undodir = home .. "/.local/state/nvim" +-- https://stackoverflow.com/a/1625850 +opt.backupdir = home .. "/.local/share/Trash/nvim//,." +opt.directory = home .. "/.local/share/Trash/nvim//,." -- Case-insensitive searching UNLESS \C or capital in search opt.ignorecase = true -- cgit v1.2.3