WhatsThatItsPat / dotfiles_research

2 stars 2 forks source link

Plugin order concerns #4

Open WhatsThatItsPat opened 4 years ago

WhatsThatItsPat commented 4 years ago

https://github.com/zsh-users/zsh-history-substring-search#usage

If you want to use zsh-syntax-highlighting along with this script, then make sure that you load it before you load this script:

% source zsh-syntax-highlighting.zsh
% source zsh-history-substring-search.zsh

Related: 86ed3bcb5f09f44101b114bde3d4e31db6eef0ed

WhatsThatItsPat commented 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.

WhatsThatItsPat commented 4 years ago

We went with zdharma/fast-syntax-highlighting instead (07d9fe0607b00c304d04f4ab34864e17e07f73a2), but it's set up in the same order suggested above and seems to work.