1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 08:28:30 +02:00

zsh: source zsh-syntax-highlighting at the end of .zshrc (#3068)

zsh-syntax-highlighting.zsh must be sourced at the end of the .zshrc file, otherwise widgets created after are not properly highlighted (e.g. from oh-my-zsh): https://github.com/zsh-users/zsh-syntax-highlighting#faq
This commit is contained in:
Maxime Brunet 2022-07-07 17:57:27 -07:00 committed by GitHub
parent 25a9948361
commit 8160b3b45b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -500,10 +500,6 @@ in
"source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
}
${optionalString cfg.enableSyntaxHighlighting
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
}
${optionalString cfg.oh-my-zsh.enable ''
# oh-my-zsh extra settings for plugins
${cfg.oh-my-zsh.extraConfig}
@ -557,6 +553,12 @@ in
# Named Directory Hashes
${dirHashesStr}
${optionalString cfg.enableSyntaxHighlighting
# Load zsh-syntax-highlighting last, after all custom widgets have been created
# https://github.com/zsh-users/zsh-syntax-highlighting#faq
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
}
'';
}