Skip to content

Commit 3417e45

Browse files
author
Ali Shahid
committed
[configs.lua] fix cache dir
1 parent b1fdf1c commit 3417e45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/configs.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
--]]
1414

1515
-- neovim backup directory
16-
local backup_dir = vim.fn.expand('~/.cache/nvim')
16+
local backup_dir = vim.fn.stdpath('data').."/.cache"
1717

1818
-- define configs
1919
local configs = {
@@ -45,7 +45,7 @@ local configs = {
4545
backupdir = backup_dir .. '/backedUP', -- where to put backup files
4646
undodir = backup_dir .. '/undos', -- where to put undo files
4747
viewdir = backup_dir .. '/view', -- where to store files for :mkview
48-
shada = "'100,<50,f50,n~/.cache/nvim/shada/shada",
48+
shada = "'100,<50,f50,n"..backup_dir.."/shada/shada",
4949

5050
clipboard = vim.opt.clipboard + "unnamedplus", -- copy & paste
5151
wrap = false, -- don't automatically wrap on load
@@ -124,7 +124,7 @@ vim.api.nvim_create_autocmd(
124124
)
125125

126126
vim.api.nvim_create_autocmd(
127-
"BufEnter",
127+
"BufWinEnter",
128128
{
129129
desc = "jump to the last position when reopening a file",
130130
pattern = "*",

0 commit comments

Comments
 (0)