Plugin configuration
CharlesGueunet opened this issue · 1 comments
Hello,
First, thanks for this nice plugin manager.
I have a question regarding plugins configuration. I am a fervent kakoune user, and in my conf I can have things like:
plug "plugin" %{
set plugin-option = true
}
I find it very convenient to have the plugin declaration and configuration next to each other.
Using zcomet
, I have:
zcomet add "plugin1"
zcomet add "plugin2"
zcomet compinit
set plugin1-option = true
set plugin2-option = true
Is there a way I could have my plugin config close to the plugin add
? In my current understanding, I need the zcomet compinit
in between.
Best
I don't see any reason why zcomet compinit
can't be last -- it's usually safest to do it that way. So then you could have something like:
# Plugin 1
zcomet load author1/plugin1
PLUGIN1_DO_SOMETHING=true
# Plugin 2
zcomet load author2/plugin2
zstyle ':plugin2:*' option ~/special_directory
zcomet compinit
(I made that example a little bit messy on purpose: the one plugin needs an environment variable, while the other needs zstyle
.)
Go ahead and try doing it that way -- if something doesn't work, show me the example and we'll figure out why. Unfortunately, since my goal is to support loading very heterogeneous code, there's no way for me to impose a uniform configuration language.