Are you by any chance on a Mac and using R2023b? There is an issue (confirmed with MATHWORKS, they fixed it for the next R2024a) with the old desktop about syntax highlighting in the editor not working anymore. You could try the new desktop (but there are other issues with dynare), or keep using r2023a if you need syntax highlighting.