Bisect bad plugin #711
Replies: 3 comments 3 replies
-
In my case I tried to figure out what made some highlighting weird so I couldn't do it programatically but of course you can also extend this to have the querying be done whether some command fails or not, much like |
Beta Was this translation helpful? Give feedback.
-
@AckslD, in the lines: for _, module in ipairs(modules) do
local spec = R('plugins.'..module)
table.insert(specs, spec)
end What's the function |
Beta Was this translation helpful? Give feedback.
-
Hello @AckslD, Thanks for the script! I wrote lazyflex.nvim. Lazyflex.nvim also aims to facilitate bisecting a bad plugin. Best regards! |
Beta Was this translation helpful? Give feedback.
-
Sometimes I have some issue in my config and I'm not completely sure what caused it. So I configured by setup and wrote a python script such that I could do a binary search of my plugins to find the culprit. Thought I would share the code here in case it's useful for anyone else. It's quite rough though so you might need to configure it to what you need
The way I used it was to run the python script below as eg:
where
<args>
are any args to nvim, such as a filepath to open.It will then start a binary search for the bad plugin by opening
nvim
(usingkitty
in my case) and after you close it ask you if it was good or bad. Quite similar togit bisect
.There is also
bisect_lazy single_remove
(remove a single plugin one at a time),bisect_lazy single_keep
(only keep one plugin at a time) andbisect_lazy random
(use random subsets of the plugins).For this to work you need something like the following when setting up
lazy
:and you can then run the following:
Happy bug hunting! :)
Beta Was this translation helpful? Give feedback.
All reactions