1 parent 26c0db9 commit 6e65b0aCopy full SHA for 6e65b0a
1 file changed
.config/nvim/lua/user/shada.lua
@@ -0,0 +1,13 @@
1
+local function set_shada_file()
2
+ local git_root = require('snacks').git.get_root()
3
+ local dir = git_root ~= nil and git_root or vim.fn.getcwd()
4
+
5
+ local shada_file = vim.fs.joinpath(
6
+ vim.fn.stdpath('state'),
7
+ 'shada',
8
+ vim.fn.fnamemodify(dir, ':t') .. '.shada'
9
+ )
10
+ vim.o.shadafile = shada_file
11
+end
12
13
+return { set_shada_file = set_shada_file }
0 commit comments