zed icon indicating copy to clipboard operation
zed copied to clipboard

Highlight Bad Unicode Characters

Open notpeter opened this issue 1 year ago • 0 comments

Check for existing issues

  • [X] Completed

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:

  • U+200B (Zero Width Space), U+200C Zero Width Non-joiner, U+200D (Zero Width Joiner)
  • Bidirectional text control characters (U+200E, U+200F)
  • Control characters (U+0000 to U+001F, U+007F to U+009F)
  • Combining characters (U+20E3, U+20DD)

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

  • Smart quotes (left/right of single/double)
  • Emdash / Endash
  • Elipses: (U+2026)
  • Unicode Ligatures, etc

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

notpeter avatar Aug 15 '24 18:08 notpeter