From cdd7b8bb6f96e2ec282d7f26c00e7291f28a93c6 Mon Sep 17 00:00:00 2001 From: Adam Hellberg Date: Wed, 3 Jul 2019 20:17:46 +0200 Subject: [PATCH] Replace fast-syntax-highlighting with zsh-syntax-highlighting on WSL --- zsh/.zshrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 3d14d23..ee6689c 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -54,8 +54,16 @@ wsl_fix_fsh() { FAST_HIGHLIGHT[chroma-git]="chroma/-ogit.ch" } -zplugin ice wait"0" atinit"zpcompinit; zpcdreplay" atload"wsl_fix_fsh" -zplugin light zdharma/fast-syntax-highlighting +# fast-syntax-highlighting is very slow in certain contexts at least on WSL +# Needs testing on non-WSL to see if slowness persists +if [[ $is_wsl ]]; then + zplugin ice wait"0" + zplugin light zsh-users/zsh-syntax-highlighting +else + zplugin ice wait"0" atinit"zpcompinit; zpcdreplay" atload"wsl_fix_fsh" + zplugin light zdharma/fast-syntax-highlighting +fi + zplugin ice wait"0" zplugin light zsh-users/zsh-history-substring-search -- 2.54.0