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 263 forks source link

Can we also have `before` in additional existing `after` to ensure the ordering/sequencing? #1153

Closed nyngwang closed 1 year ago

nyngwang commented 1 year ago

As title.

Use case: I have a plugin(let me call it Target) that I will run something inside its config = ..., but I need to ensure that some plugins' config = ...(let me call it Funs) have been called. With existing after then I have to trace those Funs and put it into the after of Target. If we have a before field then I only need to add before for every Funs. Since all Funs are pointed to the same Target, it's easier to write and maintain than the existing after method.

lewis6991 commented 1 year ago

The current set of features is already over complicated and this would make it much worse for a very small payoff.

nyngwang commented 1 year ago

@lewis6991 Then regarding my case, do you know how to solve it?

lewis6991 commented 1 year ago

It sounds like you're putting too much effort into lazy loading.

nyngwang commented 1 year ago

@lewis6991 So I should not put keymap.set inside config = ... right?

lewis6991 commented 1 year ago

Yes and don't use after.