From bd98d76ad614807839c42bb68947cd13dc7ec9c1 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sun, 30 Jan 2022 22:22:29 -0500 Subject: [PATCH] improve startup time with shada load deferral --- lua/core/options.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/core/options.lua b/lua/core/options.lua index b72ad62..9c327db 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -3,6 +3,13 @@ local g = vim.g 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.clipboard = options.clipboard opt.cmdheight = options.cmdheight