extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Broken SCSS highlighting when after `:` with no space afterwards

Open panstromek opened this issue 9 months ago • 1 comments

Summary

If you omit space after : in CSS properties, the highlighting after that line is broken:

Image

Description

Steps to reproduce:

  1. 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

panstromek avatar May 11 '25 13:05 panstromek

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?)

SomeoneToIgnore avatar May 11 '25 15:05 SomeoneToIgnore

Closing as an upstream issue.

notpeter avatar Jun 05 '25 18:06 notpeter

Is there an upstream issue though?

panstromek avatar Jun 06 '25 07:06 panstromek

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.

notpeter avatar Jun 07 '25 03:06 notpeter