improve startup time with shada load deferral

This commit is contained in:
zbirenbaum 2022-01-30 22:22:29 -05:00 committed by siduck
parent e87c10f225
commit bd98d76ad6
1 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,13 @@ local g = vim.g
local options = require("core.utils").load_config().options local options = require("core.utils").load_config().options
--Defer loading shada until after startup
vim.opt.shadafile = "NONE"
vim.defer_fn(function()
vim.opt.shadafile = vim.fn.expand("$HOME") .. "/.local/share/nvim/shada/main.shada"
vim.cmd[[ rsh ]]
end, 0)
opt.title = true opt.title = true
opt.clipboard = options.clipboard opt.clipboard = options.clipboard
opt.cmdheight = options.cmdheight opt.cmdheight = options.cmdheight