Sometimes syntax is OK, but all that is getting broken are foldings. In that case zx helps alot.
From VIM documentation:
zx
Update folds: Undo manually opened and closed folds: re-apply
'foldlevel', then do "zv": View cursor line.
Also forces recomputing folds. This is useful when using
'foldexpr' and the buffer is changed in a way that results in
folds not to be updated properly.