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
Is your feature request related to a problem? Please describe.
When a package has "enabled = false" then the package is removed from package.json (I believe).
Because the version is removed then if I enable a package again it's a different version from last time.
It's especially annoying that I have a work PC and a home PC with different packages enabled (controlled via env variable). My packages are therefore not properly locked to their versions on both of my PC and I have a ton of noise because git status shows me that package.json is different everytime I start nvim on my home/work PC.
A workaround I use is to use two differents package.json and loads them conditionnaly depending if it's work/home PC. But now every single package potentially has different versions so it's worse in that regard (but less noise in git status)
Describe the solution you'd like
Do not remove disabled packages from package.json
Describe alternatives you've considered
Make my solution optional (enable it via a flag). But I think it's better if always enabled
Another solution would be using the same package.json for my two environnements (for the packages enabled in both environnements) and have then two other package.json, one for each environnement, for only the packages that are enabled conditionnally. But it's kinda complicated I think because then how to specify what package.json to use etc.
Additional context
No response
The text was updated successfully, but these errors were encountered:
I need this too. I just migrated to lazy, and it works very nicely except for this only one thing.
In some cases, I want to enable/disable plugins for certain conditions. E.g. I use obsidian for note taking, but I only want to enable it when I'm in the obsidian directory not just any markdown files.
I tried both enabled and cond, but they behave similarly. If either enabled or cond is false, the plugin will be removed from the lock file.
Did you check the docs?
Is your feature request related to a problem? Please describe.
When a package has "enabled = false" then the package is removed from package.json (I believe).
Because the version is removed then if I enable a package again it's a different version from last time.
It's especially annoying that I have a work PC and a home PC with different packages enabled (controlled via env variable). My packages are therefore not properly locked to their versions on both of my PC and I have a ton of noise because git status shows me that package.json is different everytime I start nvim on my home/work PC.
A workaround I use is to use two differents package.json and loads them conditionnaly depending if it's work/home PC. But now every single package potentially has different versions so it's worse in that regard (but less noise in git status)
Describe the solution you'd like
Do not remove disabled packages from package.json
Describe alternatives you've considered
Make my solution optional (enable it via a flag). But I think it's better if always enabled
Another solution would be using the same package.json for my two environnements (for the packages enabled in both environnements) and have then two other package.json, one for each environnement, for only the packages that are enabled conditionnally. But it's kinda complicated I think because then how to specify what package.json to use etc.
Additional context
No response
The text was updated successfully, but these errors were encountered: