faerryn / user.nvim

Since the advent of vim and neovim, countless package managers have appeared and dissappeared. Well, here's another to the list.
MIT License
32 stars 2 forks source link

Is there a way to declare some plugins as dependent on some others? #5

Closed Gaarco closed 2 years ago

Gaarco commented 2 years ago

Instead of multiple use, if I have a plugin "foo/bar_1" that depends on `"foo/bar" would be nice a syntax like this:

use({
    "foo/bar"
    required = {
        "foo/bar_1",
        "foo/bar_2",
    }
})

Is this possible?

Gaarco commented 2 years ago

I found it's sort of possible like this:

user.use({
    "plugin",
    init = function ()
        user.use({"requires plugin"})
    end,
    config = function ()
        require("configs/plugin")
    end
})

I like this approach and I would like to know if I'll stumble upon some sort of limitations by doing this.