nvim-neorocks / rocks-config.nvim

Allow rocks.nvim to help configure your plugins.
GNU General Public License v3.0
61 stars 3 forks source link

[Feature] Install plugins from bundles #68

Open bottd opened 1 month ago

bottd commented 1 month ago

As a user it would be convenient to configure plugins from alongside bundles. With the current setup we configure a plugin separately from the bundle configuration:

[plugins]
"neodev.nvim"= "scm"
nvim-lspconfig = { version = "0.1.7" } 

[plugins.nvim-cmp]
git = "hrsh7th/nvim-cmp" # Use the git version of nvim-cmp for the best experience.

[bundles.lsp] # Create a bundle called `lsp`
items = [
    "neodev.nvim",
    "nvim-lspconfig",
    "nvim-cmp"
]

Adding a plugin config option like bundle could work:

[plugins]
"neodev.nvim"= { version = "scm", bundle = "lsp"]
nvim-lspconfig = { version = "0.1.7", bundle = "lsp" } 

[plugins.nvim-cmp]
git = "hrsh7th/nvim-cmp" # Use the git version of nvim-cmp for the best experience.
bundle = "lsp"

My intuition is that the implementation of bundles also holding plugin config is more work than a bundle config solution. However I appreciate bundles for offering structure to plugins in rocks.toml. Having plugin config within them would be nice:

[bundles.lsp.plugins]
"neodev.nvim"= "scm"
nvim-lspconfig = { version = "0.1.7" } 

[bundles.lsp.plugins.nvim-cmp]
git = "hrsh7th/nvim-cmp" # Use the git version of nvim-cmp for the best experience.

If not for the bundles.X.config this could be shortened slightly to omit plugins:

[bundles.lsp]
"neodev.nvim"= "scm"
nvim-lspconfig = { version = "0.1.7" } 

[bundles.lsp.nvim-cmp]
git = "hrsh7th/nvim-cmp" # Use the git version of nvim-cmp for the best experience.
mrcjkb commented 1 month ago

Hey 👋

I quite like the bundles.X.<plugin> suggestion. We will need to wait for an API in rocks.nvim (one which I was planning to add in order to support rocks-git.nvim anyway).