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
49.53k stars 3.03k forks source link

Hyphen not honored as word separator in Markdown or Terraform files #15299

Open SeanGriffin-Wellsky opened 3 months ago

SeanGriffin-Wellsky commented 3 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

I see many existing issues related to Markdown but nothing directly calling out this issue. It appears a hyphen is not recognized as a word separator in Markdown or Terraform files like it is in Plain Text files. This is unexpected and different than how VS Code or JetBrains tools work. Different than this very text box as well.

In these examples, Alt+Arrow correctly navigates across words and punctuation: a.b.c.d a/b/c/d

In this example it does not: a-b-c-d

In Plain Text files, however, the hyphen is recognized as a separator.

Environment

Zed: v0.145.1 (Zed) OS: macOS 14.5.0 Memory: 32 GiB Architecture: x86_64

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

No response

If applicable, attach your Zed.log file to this issue.

No response

SeanGriffin-Wellsky commented 3 months ago

FWIW, the underscore is also not recognized as a word separator, which at first was surprising, but it appears it's not a separator in VS Code, JetBrains, or this text box, so I guess that's expected.