mirror of
https://github.com/nix-community/home-manager
synced 2024-09-05 02:46:30 +02:00
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
26 lines
555 B
Nix
26 lines
555 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
programs.kakoune = {
|
|
enable = true;
|
|
config.showWhitespace = {
|
|
enable = true;
|
|
lineFeed = ''"'';
|
|
space = " ";
|
|
nonBreakingSpace = "' '"; # backwards compat
|
|
tab = "'";
|
|
# tabStop = <default>
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/kak/kakrc
|
|
assertFileContains home-files/.config/kak/kakrc \
|
|
"add-highlighter global/ show-whitespaces -tab \"'\" -spc ' ' -nbsp ' ' -lf '\"'"
|
|
'';
|
|
};
|
|
}
|