packer.nvim icon indicating copy to clipboard operation
packer.nvim copied to clipboard

Allow disabling plugins by commenting them out

Open mawkler opened this issue 3 years ago • 2 comments

First of all, thanks for a really great package manager!

Something that I miss from plugin managers like vim-plug is the ability to quickly disable one or many plugins by commenting them out from my init.lua. With packer.nvim, commenting out every plugin in init.lua and running :PackerCompile only disables loading plugins in opt/ and not the ones in start/. I personally think that it is really unintuitive, especially to new users, how even if you've removed a plugin from your init.lua and run :PackerCompile, that plugin could still get loaded. Is there any simple way to achieve this currently?

Running :PackerSync after commenting out plugins will completely uninstall them. However, when debugging plugins and trying to find out which one, or which ones, are causing a particular problem, :PackerSync has to be run many times, and it quickly becomes annoying having to wait for it to finish updating and removing (if they were commented out) or re-downloading (if their comment was removed) plugins.

What I would like is an option like opt_default, but that also automatically loads any plugin for which use is called (except for if they're lazy loaded using keys, cmd, etc.).

What are your thoughts on this? I'm guessing that this is related to #307 and #337.

mawkler avatar Apr 18 '22 17:04 mawkler

yes,wo support above option

Mr-LLLLL avatar Apr 21 '22 02:04 Mr-LLLLL

@zhaogangang Could you elaborate please?

mawkler avatar Apr 21 '22 06:04 mawkler