modified the set.lua file so it can include windows as welll as linux/unix

This commit is contained in:
Steven Medeiros Melo
2024-03-24 15:37:32 -04:00
parent 9ffc5b6d98
commit f490e63f8d

View File

@@ -18,7 +18,13 @@ vim.opt.wrap = false
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
if vim.fn.has('win32') or vim.fn.has('win64') then
vim.opt.undodir = os.getenv("XDG_CONFIG_HOME") .. "/.vim/undodir"
else
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
end
vim.opt.undofile = true
vim.opt.hlsearch = false