I have released a plugin that is a highly optimized version of Zsh-Syntax-Highlighting project. Overall 60 optimizing commits have been shipped, and the result is that zed/vared can edit functions that have 10 kB of text in their body. Also, multiple syntax-recognition upgrades are being shipped:

  1. Variable highlighting
  2. Colorizing of ${(a)parameter[...]} inside strings (normally only $parameter is colorized)
  3. Fixed colorizing of function definition, like abc() { ... } – abc will not be red
  4. Fixed colorizing of complex conditions inside [[, like [[ "$a" || "$b" ]]
  5. Closing ]] and ] are highlighted
  6. Paths from $CDPATH aren’t colorized unless the command is cd

Check out full story at Github project page