mattmc3 / antidote

https://getantidote.github.io - the cure to slow zsh plugin management
MIT License
855 stars 21 forks source link

Be smarter about where `antidote install` writes within zsh_plugins.txt #60

Open mattmc3 opened 2 years ago

mattmc3 commented 2 years ago

Some plugins like history-substring-search and zsh-syntax-highlighting like to be loaded last. antidote install just puts plugins at the bottom of the list in .zsh_plugins.txt. Let's add a simple barrier detection that users can put in their bundle file to tell antidote where to put new plugins:

rupa/z
zsh-users/completions

# < new plugins get inserted here because ### FOOTER ### line detected
### Footer ###

zsh-users/zsh-syntax-highlighting
zsh-users/zsh-history-substring-search

I'm not happy with the word "footer", but this is fine for now. Just something where the user can indicate where new installs go if they choose to. Otherwise, it goes at the end like it does today.

mattmc3 commented 2 years ago

One other idea: start off with some character-based text barrier: ### ^^^ ### and then add a zstyle to customize it. It's such a little feature for only a few advanced users, it's not worth too much hand wringing to get it just perfect.