You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.9.0 (homebrew)
Operating system/version
macOS 13.3.1
Describe the bug
So, in the plugin spec, dependencies is described as follows:
A list of plugin names or plugin specs that should be loaded when the plugin loads. Dependencies are always lazy-loaded unless specified otherwise. When specifying a name, make sure the plugin spec has been defined somewhere else.
I have a setup where I have one plugin per file and I just { import = { "plugins" } } in my init.lua. There's a minimal example here.
When trying to setup noice and which-key together, noice would complain that which-key.nvim spec if not defined.
I expected that putting which-key as a dependency for noice, lazy would handle the order, but apparently things are running in alphabetical order for the configuration (1), despite the plugins being loaded correctly for the startup (2).
The result of :Lazy profile
Steps To Reproduce
Load plugin a.lua that depends on plugin b.lua.
Make sure that when declaring the dependency for b.lua, you pass opts. It can be a function or a table. If the opts property is empty this error does not occur
Import the plugins in your init.lua
Expected Behavior
I expected lazy to manage the order of setting the option when referencing named plugins with options.
Ah, yes. I actually did get that from LazyVim (although I'm no longer using it) so that's why the mapping is the same. I did have to change it a bit as I need to return the opts for my own setup. Thanks for the help!
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.9.0 (homebrew)
Operating system/version
macOS 13.3.1
Describe the bug
So, in the plugin spec, dependencies is described as follows:
I have a setup where I have one plugin per file and I just
{ import = { "plugins" } }
in myinit.lua
. There's a minimal example here.When trying to setup noice and which-key together, noice would complain that
which-key.nvim
spec if not defined.But a file does exists that defines
which-key.nvim
:I expected that putting
which-key
as a dependency fornoice
, lazy would handle the order, but apparently things are running in alphabetical order for the configuration (1), despite the plugins being loaded correctly for the startup(2).
The result of
:Lazy profile
Steps To Reproduce
a.lua
that depends on pluginb.lua
.b.lua
, you passopts
. It can be a function or a table. If theopts
property is empty this error does not occurinit.lua
Expected Behavior
I expected lazy to manage the order of setting the option when referencing named plugins with options.
Repro
The text was updated successfully, but these errors were encountered: