Broken SCSS highlighting when after `:` with no space afterwards
Summary
If you omit space after : in CSS properties, the highlighting after that line is broken:
Description
Steps to reproduce:
- Paste this CSS into a new SCSS file:
a.skip-main {
left:-999px;
position:absolute;
top:auto;
width:1px;
height:1px;
overflow:hidden;
z-index:-999;
}
Expected Behavior: correct highligting Actual Behavior: highlighting broken, some highliting is mid word, most is just grey/purple
Notes:
- This works correctly in CSS files.
- If you add space after any
:in the paragraph above, following highlighting is fixed until next:without space.
Zed Version and System Specs
Zed: v0.185.15 (Zed) OS: Linux Wayland ubuntu 24.04 Memory: 30.7 GiB Architecture: x86_64 GPU: AMD Radeon 780M (RADV GFX1103_R1) || radv || Mesa 24.2.8-1ubuntu1~24.04.1
This means a tree-sitter grammar is not taking this case into account.
https://github.com/savetheclocktower/tree-sitter-scss is the grammar where this issue would better go to. Then, https://github.com/bajrangCoder/zed-scss Zed extension needs a grammar update (maybe, there's already an update that can fix it?)
Closing as an upstream issue.
Is there an upstream issue though?
The problem described here is caused by tree-sitter bundled in a community extension. This repository is for managing which extensions/version are available in zed, not the issues with those extensions or their dependencies.
You should raise the issue upstream.