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

add plugin overriding feature #1200

Open prevostcorentin opened 1 year ago

prevostcorentin commented 1 year ago

PR related to issue #1201.

prevostcorentin commented 1 year ago

This PR can be improved:

If two plug-ins defines override=true, the second one in the read order will replace the first one. Because the plug-in specification table is filled asynchronously, two overrides will bring hazardous situations.

Two solutions comes in mind:

I don't see any situation where two overrides would be necessary. This feature should be used when you are developing a feature you need on a plugin you pull from github and the feature is not yet merged. While waiting for the feature to be merged or not, you want to keep a configuration as clean possible (as I like to do).

I would personally disabling the ability to define more than one override for a given plug-in.

Best regards.