From 78ddf8d624a59e34054369bbbfc08456dfe0bac7 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Fri, 12 Aug 2022 11:49:12 +0530 Subject: [PATCH] Just load impatient from init if will be called multiple times if present in lazy_load.lua which is totallly unnecessary why even from there ? Yes, this does not affect the --startuptime --- init.lua | 4 ++++ lua/core/lazy_load.lua | 1 - lua/plugins/init.lua | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index b80c53d..1c19c3f 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,7 @@ +vim.defer_fn(function() + pcall(require, "impatient") +end, 0) + require "core" require "core.options" diff --git a/lua/core/lazy_load.lua b/lua/core/lazy_load.lua index acb17f5..1ddd62f 100644 --- a/lua/core/lazy_load.lua +++ b/lua/core/lazy_load.lua @@ -10,7 +10,6 @@ M.lazy_load = function(tb) callback = function() if tb.condition() then vim.api.nvim_del_augroup_by_name(tb.augroup_name) - pcall(require, "impatient") -- dont defer for treesitter as it will show slow highlighting -- This deferring only happens only when we do "nvim filename" diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b7dd336..823654d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -214,7 +214,7 @@ local plugins = { }, -- Speed up deffered plugins - ["lewis6991/impatient.nvim"] = { module = "impatient" }, + ["lewis6991/impatient.nvim"] = {}, } require("core.packer").run(plugins)