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.26k stars 3.09k forks source link

Highlight Bad Unicode Characters #16310

Closed notpeter closed 3 weeks ago

notpeter commented 3 months ago

Check for existing issues

Describe the feature

Working with a document that had some invisible U+200D zero-width joiner characters which resulted in some odd rendering bugs.

Zed should highlight these and optionally potentially other classes of "bad" characters:

Additionally it might be helpful to optionally support highlighting "maybe bad" characters:

Vscode:

image

Zed:

image

VSCode includes a bunch of settings which help control this behavior `editor.unicodeHighlight.* as inspirations for how to control this behavior.

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

Screenshot 2024-08-15 at 14 53 49
dovakin0007 commented 2 months ago

it seems like some of the control characters are not getting rendered any ideas what we can do when I add a space or character the highlights rendered over the text image

notpeter commented 1 month ago

Adding Non-Breaking space: " " to this list. On MacOS, type option + space to create one. Thanks @tjconcept for the easy reproduction