The kakoune editor has a plugin mechanism and several plugins are
already packaged under `pkgs.kakounePlugins`. However, adding these
packages to `home.packages` is not enough: the `kakoune` package needs
to be configured with the list of plugins to include, so that they get
sourced on start-up.
We add a `programs.kakoune.plugins` option, analogous to
`programs.vim.plugins`.
The change is backwards compatible since `pkgs.kakoune` is defined as
wrapKakoune kakoune-unwrapped { };
and `wrapKakoune` defaults the list of plugins to empty.
PR #1356
We were passing the separators for the `show-whitespaces` highlighter
verbatim. This was problematic in case one wanted to use, spaces,
quotes or `%` as separators since the resulting kakoune configuration
would be invalid.
According to kakoune's docs, the separator has to be one character
long, so we can use a simple rule for escaping them. It is possible
that people has been working this around by passing, e.g. `"' '"` as
separator in order to get a space (i.e., escaped explicitly by the
user), so we just let longer strings be used verbatim.
PR #1357
Instead of using several regex assertions, just state precisely what we
are producing. While the regex was technically more flexible, since it
would ignore differences in whitespace, it was also harder to read/edit.