1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-18 14:28:15 +00:00

zsh: correct syntax option to syntax-highlighting (#5792)

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 2025-03-08 20:37:10 +02:00 committed by GitHub
parent 2c87a6475f
commit b2314312f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -738,7 +738,7 @@ in
ZSH_HIGHLIGHT_HIGHLIGHTERS+=(${lib.concatStringsSep " " (map lib.escapeShellArg cfg.syntaxHighlighting.highlighters)}) ZSH_HIGHLIGHT_HIGHLIGHTERS+=(${lib.concatStringsSep " " (map lib.escapeShellArg cfg.syntaxHighlighting.highlighters)})
${lib.concatStringsSep "\n" ( ${lib.concatStringsSep "\n" (
lib.mapAttrsToList 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 cfg.syntaxHighlighting.styles
)} )}
${lib.concatStringsSep "\n" ( ${lib.concatStringsSep "\n" (

View file

@ -15,6 +15,6 @@
nmt.script = '' nmt.script = ''
assertFileContains home-files/.zshrc "source ${pkgs.hello}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" 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_HIGHLIGHTERS+=(brackets pattern cursor)"
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_STYLES+=(comment 'fg=#6c6c6c')" assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_STYLES[comment]='fg=#6c6c6c'"
''; '';
} }