plugins: More lazy load, yay

use vim.defer_fn to load the plugins after entering the ui

add the lazy load to setup

lazy load gitsigns, neoscroll, lspinstall and vim-matchup using this method

rearrange according to startup sequence
This commit is contained in:
Akianonymus 2021-08-26 15:10:26 +05:30 committed by siduck76
parent 66de975543
commit adf0168dcc
2 changed files with 66 additions and 46 deletions
lua/core

View file

@ -310,4 +310,14 @@ end]]
return into
end
-- load plugin after entering vim ui
M.packer_lazy_load = function(plugin, timer)
if plugin then
timer = timer or 0
vim.defer_fn(function()
require("packer").loader(plugin)
end, timer)
end
end
return M