mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-09-01 08:15:20 +02:00
perf: lazy load most plugins (#3750)
* perf: lazy load most plugins
* fix(lazy): suggested fixes for pref/lazyloading branch (#3754)
fix(lazy): Suggested fixes from previous comments
fix(lazy): applying suggestions from code review
Co-authored-by: LostNeophyte <lostneophyte@tuta.io>
Co-authored-by: Pratyush Bharati <pbharati@Pratyushs-MacBook-Pro.local>
Co-authored-by: LostNeophyte <lostneophyte@tuta.io>
* chore: format
* move lazy utils to modules.lua
* simplify telescope actions
* refactor: cmp_window local name
* feat: more lazy loading cmds
* refactor(cmp): minor clean up
* perf: set lazy loading by default
* refactor(alpha): remove broken lazy load
* revert: explictily set lazy loading
This reverts commit ba38193e4e
.
* test: enable lazy-loading for bigfile
* perf: defer projects and alpha to VimEnter
* refactor(bufferline): add comment
* perf: better lazy load dap/dapui
* perf: lazy load ts-commentstring with Comment.nvim pre_hook
---------
Co-authored-by: pr-313 <46706232+pr-313@users.noreply.github.com>
Co-authored-by: Pratyush Bharati <pbharati@Pratyushs-MacBook-Pro.local>
Co-authored-by: opalmay <opal.mizrahi2@gmail.com>
Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
This commit is contained in:
parent
c18cd3f0a8
commit
60c7ad77fd
14 changed files with 172 additions and 89 deletions
|
@ -95,4 +95,28 @@ M.reload = function(mod)
|
|||
return old
|
||||
end
|
||||
|
||||
-- code from <https://github.com/tjdevries/lazy-require.nvim/blob/bb626818ebc175b8c595846925fd96902b1ce02b/lua/lazy-require.lua#L25>
|
||||
function M.require_on_index(require_path)
|
||||
return setmetatable({}, {
|
||||
__index = function(_, key)
|
||||
return require(require_path)[key]
|
||||
end,
|
||||
|
||||
__newindex = function(_, key, value)
|
||||
require(require_path)[key] = value
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- code from <https://github.com/tjdevries/lazy-require.nvim/blob/bb626818ebc175b8c595846925fd96902b1ce02b/lua/lazy-require.lua#L25>
|
||||
function M.require_on_exported_call(require_path)
|
||||
return setmetatable({}, {
|
||||
__index = function(_, k)
|
||||
return function(...)
|
||||
return require(require_path)[k](...)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue