bajrangCoder / zed-scss

SCSS support for Zed
13 stars 4 forks source link

Don't treat `-` as a word character #9

Closed maxdeviant closed 3 months ago

maxdeviant commented 3 months ago

This PR removes - as a word character.

Since CSS uses - as a common separator between words in selectors, it shouldn't be used as a word character, as this means you can only select the entire selector with the cursor instead of individual words.

Before

https://github.com/user-attachments/assets/7ec3819e-30d2-47a5-8557-73f68294f0ac

After

https://github.com/user-attachments/assets/e46b6a94-0b56-45c9-b286-5c1136a1686e

This matches the behavior we're now using for plain CSS: https://github.com/zed-industries/zed/pull/17084.

bajrangCoder commented 3 months ago

Thanks ❤️