lazy loading 100%!!

This commit is contained in:
siduck76
2021-07-18 22:11:52 +05:30
parent 9f1dc90269
commit 4ff7208c66
4 changed files with 30 additions and 31 deletions

View File

@@ -1,27 +1,17 @@
-- load all options
require "options"
-- load stuff only if theme is initialized
if require "theme" then
local async
async =
vim.loop.new_async(
vim.schedule_wrap(
function()
require "pluginList"
require "plugins.bufferline"
require "highlights"
require "mappings"
require("utils").hideStuff()
local async
async =
vim.loop.new_async(
vim.schedule_wrap(
function()
require "pluginList"
require "plugins.bufferline"
require "mappings"
require("utils").hideStuff()
async:close()
end
)
async:close()
end
)
async:send()
else
-- otherwise run PackerSync
require "pluginList"
print("Now PackerSync will be executed, after completion, restart nvim.\n")
vim.cmd("PackerSync")
end
)
async:send()