zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.82k stars 3.15k forks source link

HTML syntax highlighting broken in ERB files #12174

Open drale2k opened 6 months ago

drale2k commented 6 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Since the latest Zed update (v0.136.2) syntax highlighting is broken in ERB files. As can be seen in the screenshot, ruby code is highlighted while HTML is not.

I installed the Ruby extension after the update and restarted Zed multiple times.

Environment

Zed: v0.136.2 (Zed) OS: macOS 14.2.1 Memory: 64 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screenshot 2024-05-23 at 02 54 06

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

vitallium commented 6 months ago

Yeah, I think there is an issue. I can replicate it too by following these steps:

  1. Quit any Zed running instances. This is important.
  2. Start Zed and open any ERB file. You should see the uncolored HTML.
  3. But if you close file and open it again, then everything should be fine.
drale2k commented 6 months ago

Closing and opening the file indeed works, i am almost embarrassed i didn't try that. I closed and opened the Editor 20 times though 😅

TimSullivan commented 1 month ago

I also see this, and was about to report it. If you edit the file, it usually colours the immediate area correctly, but often not the entire file. This sometimes spontaneously happens as well, it's not exclusively when you open the file for the first time.

notpeter commented 3 weeks ago

See also: