Since recently my syntax highlighting for ft=sh
(also syn=sh
is set) is broken:
Why is that? How can I fix it?
Edit:
I'm using Vim 9.0 with patches 1-1302.
I add here the code from the screenshot. The code does not matter much, though. Syntax highlighting is broken for all my bash scripts that I checked. It seems to work for a few lines, before it breaks down.
#!/usr/bin/env bash
# Here is a comment. In yellow.
foo=bar
bar=baz
baz="${1}"
if [ "${foo}" == "bar" ]; then
bar=foo
elif [ "${foo}" == "baz" ]; then
bar=oof
fi
# Here is a comment. In green?
cd "$HOME"
mv x y
echo hello world
# Whatever I do, all is green.
syntax_checkers/sh/sh.vim
is part of ALE, which has nothing to do with syntax highlighting. Look forsyntax/sh.vim
instead, both in your own runtime and in the system one.