packer.nvim
packer.nvim copied to clipboard
Lazy-loading dependencies, too
Describe the feature
I have an entry for Octo, which has a few dependencies:
use {
'pwntester/octo.nvim',
requires = {
'nvim-lua/plenary.nvim', 'nvim-telescope/telescope.nvim',
'kyazdani42/nvim-web-devicons'
},
cmd = {'Octo'},
config = function() require"octo".setup() end,
}
because cmd
is specified, Octo is not loaded at startup. However, its three dependencies, which are not use
d themselves, are.
...
• nvim-treesitter
• nvim-web-devicons
• octo.nvim (not loaded)
• packer.nvim
• plenary.nvim
...
It would be nice if Packer could tell which dependencies are not required by any other package, and load them at the same time it lazy loads the package that requires them.
use {
'pwntester/octo.nvim',
wants = {
'nvim-lua/plenary.nvim', 'nvim-telescope/telescope.nvim',
'kyazdani42/nvim-web-devicons'
},
cmd = {'Octo'},
config = function() require"octo".setup() end,
}
Does it work if you replace require
with wants
?
I think this is the same issue as mentioned in #803
Anyone found a solution to this?