Closed UtkarshVerma closed 1 year ago
The same problem with the keys
property. Plugin is disabled but its key mappings are loaded.
@AlexMasterov that's not correct. When using cond
then yes, that's on purpose, but not when enabled=false
As for OP's issue, that's how dependencies work.
Dependencies just specify what deps need to be loaded when the plugin loads. It does not do anything special to the specs of the dependencies.
Specs get merged to one spec per plugin.
As long as a plugin is not disabled, it will be loaded.
Merging part of a spec only when the dependent is enabled is not supported.
Did you check the docs?
Is your feature request related to a problem? Please describe.
I am organizing my plugin spec based on the feature they implement. For example,
completion.lua
has the following snippet:If, for some reason, I wanted to disable this specific spec, I can do it through
enabled = false
. However, even when I disable the spec,lazy
still tries to process the dependencies and tries to initializenvm-lspconfig
withcmp-nvim-lsp
. This fails because the plugin has not been loaded.Describe the solution you'd like
If any spec has
enabled = false
set, thenlazy
should completely ignore all config associated with it, including the dependencies.Describe alternatives you've considered
N/A
Additional context
No response