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:
parent
25a9948361
commit
8160b3b45b
|
@ -500,10 +500,6 @@ in
|
||||||
"source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
"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 ''
|
${optionalString cfg.oh-my-zsh.enable ''
|
||||||
# oh-my-zsh extra settings for plugins
|
# oh-my-zsh extra settings for plugins
|
||||||
${cfg.oh-my-zsh.extraConfig}
|
${cfg.oh-my-zsh.extraConfig}
|
||||||
|
@ -557,6 +553,12 @@ in
|
||||||
|
|
||||||
# Named Directory Hashes
|
# Named Directory Hashes
|
||||||
${dirHashesStr}
|
${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"
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue