Open WhatsThatItsPat opened 4 years ago
Why must zsh-syntax-highlighting.zsh be sourced at the end of the .zshrc file?
zsh-syntax-highlighting.zsh wraps ZLE widgets. It must be sourced after all custom widgets have been created (i.e., after all zle -N calls and after running compinit). Widgets created later will work, but will not update the syntax highlighting.
We went with zdharma/fast-syntax-highlighting instead (07d9fe0607b00c304d04f4ab34864e17e07f73a2), but it's set up in the same order suggested above and seems to work.
https://github.com/zsh-users/zsh-history-substring-search#usage
Related: 86ed3bcb5f09f44101b114bde3d4e31db6eef0ed