zsh: correct syntax option to syntax-highlighting

The current syntax of highlighting style is outdated and not working as well. So this pr aims to update it so follow `zsh-syntax-highlight`` new syntax [example](e0165eaa73/highlighters/main/main-highlighter.zsh (L32)).
This commit is contained in:
Mahmoud Ayman 2024-09-02 14:06:51 +03:00
parent 8a16716428
commit c5650f1fe0
No known key found for this signature in database
GPG key ID: A23D3563FD90EA8F
2 changed files with 2 additions and 2 deletions

View file

@ -713,7 +713,7 @@ in
ZSH_HIGHLIGHT_HIGHLIGHTERS+=(${lib.concatStringsSep " " (map lib.escapeShellArg cfg.syntaxHighlighting.highlighters)})
${lib.concatStringsSep "\n" (
lib.mapAttrsToList
(name: value: "ZSH_HIGHLIGHT_STYLES+=(${lib.escapeShellArg name} ${lib.escapeShellArg value})")
(name: value: "ZSH_HIGHLIGHT_STYLES[${lib.escapeShellArg name}]=${lib.escapeShellArg value}")
cfg.syntaxHighlighting.styles
)}
${lib.concatStringsSep "\n" (

View file

@ -20,7 +20,7 @@ with lib;
nmt.script = ''
assertFileContains home-files/.zshrc "source ${pkgs.hello}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_HIGHLIGHTERS+=(brackets pattern cursor)"
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_STYLES+=(comment 'fg=#6c6c6c')"
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_STYLES[comment]='fg=#6c6c6c'"
'';
};
}