-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: add non-plugin-dependencies in plugin spec #1264
Comments
I think you can use https://github.com/folke/lazy.nvim/blob/main/doc/lazy.nvim.txt#L130 |
My FR is about being able to define non-plugin-dependencies. I fail to see how this is related to |
|
This FR is not about conditions for enabling plugins... |
Out of scope of lazy.nvim, but related to pkg.json. |
Did you check the docs?
Is your feature request related to a problem? Please describe.
lazy.nvim encourages you to put everything related to a plugin into the plugin spec, which makes the config much cleaner.
However, one thing not being "bundled" in the plugin spec are the non-plugin dependencies of a plugin. Those are, for example:
debugpy
fornvim-dap-python
gh
forocto.nvim
jq
forrest.nvim
Describe the solution you'd like
Simply stipulating that some key, e.g.
extra_dependencies
ornon_plugin_dependencies
should be used for this would already be enough. It wouldn't need to be lazy's job to install them (mason.nvim can do that), it would just need a "standardized" key.Simply adding a row to the docs, defining that a certain key is to be used/reserved to list non-plugin-dependencies could already fulfill this FR; the rest would be up to other plugin devs. (similar to
build.lua
)Describe alternatives you've considered
It is of course possible to manually add some key, e.g.
masonDependencies
to the plugin spec, and then get all those dependencies viarequire("lazy").plugins()
.However, simply stipulating a plugin spec key would help in standardizing this and thus enable, so plugin devs would be more incentivized simply all use that one key prescribed by lazy.nvim.
Additional context
Having a way to express those dependencies in the plugin spec would be consistent with lazy.nvim's philosophy of bundling everything in the spec, make a plugin config more transparent, and also allow other plugins like for example mason with mason-tools-installer to add features to auto-install this those packages. (all the examples I listed are already available via mason).
This would, ultimately, make nvim configs a bit easier to set up for new users, and also make it a nvim config fully bootstrappable on a new machine.
The text was updated successfully, but these errors were encountered: