wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.72k stars 262 forks source link

How to specify a plugin which should be loaded before all other plugins? #1134

Open I60R opened 1 year ago

I60R commented 1 year ago

I've tried to reassign use function like this:

    use 'my-plugin.nvim'

    _G.use = function(spec)
        if type(spec.after) == 'string' then
            spec.after = { spec.after, }
        end
        spec.after[#spec.after+1] = "my-plugin.nvim"
    end

    use 'plugins-after'

but there's no effect.


And it seems that there's no packer setting that allows to achieve this