Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "boundary" option for rendering whitespace #4290

Closed
1 task done
wzxu opened this issue Jan 5, 2024 · 5 comments
Closed
1 task done

Support "boundary" option for rendering whitespace #4290

wzxu opened this issue Jan 5, 2024 · 5 comments
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label]

Comments

@wzxu
Copy link

wzxu commented Jan 5, 2024

Check for existing issues

  • Completed

Describe the feature

I'm missing this option from VS Code.
Showing leading indentation is important, and trailing spaces make it clear to be trimmed, but I don't care about normal single whitespace between code (multiple ones should still show; see example from VS Code below).
image

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

Example

VS Code:
image
Zed (using "show_whitespaces"="all"):
image

@wzxu wzxu added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Jan 5, 2024
@JosephTLyons JosephTLyons added editor Feedback for code editing, formatting, editor iterations, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jan 5, 2024
@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
nicholascioli added a commit to nicholascioli/zed that referenced this issue May 17, 2024
This commit adds support for only rendering whitespace that is on
a boundary, the logic of which is explained below:

- Any tab character
- Whitespace at the start and end of a line
- Whitespace that is directly adjacent to another whitespace

Fixes zed-industries#4290
nicholascioli added a commit to nicholascioli/zed that referenced this issue Jun 5, 2024
This commit adds support for only rendering whitespace that is on
a boundary, the logic of which is explained below:

- Any tab character
- Whitespace at the start and end of a line
- Whitespace that is directly adjacent to another whitespace

Fixes zed-industries#4290
SomeoneToIgnore pushed a commit that referenced this issue Jun 5, 2024
![image](https://github.com/zed-industries/zed/assets/1240491/3dd06e45-ae8e-49d5-984d-3d8bdf98d983)

Added support for only rendering whitespace that is on a
boundary, the logic of which is explained below:

- Any tab character
- Whitespace at the start and end of a line
- Whitespace that is directly adjacent to another whitespace


Release Notes:

- Added `boundary` whitespace rendering option
([#4290](#4290)).




---------

Co-authored-by: Nicholas Cioli <nicholascioli@users.noreply.github.com>
@JosephTLyons
Copy link
Contributor

This just landed in v0.139.0-pre today.

@wzxu
Copy link
Author

wzxu commented Jun 6, 2024

@JosephTLyons Great news, but default settings and doc doesn't seem to have been updated?

38383

Zed: v0.139.0 (Zed Preview)
OS: macOS 14.5.0
Memory: 16 GiB
Architecture: aarch64

@SomeoneToIgnore
Copy link
Contributor

Thanks for the catch, added some docs in #12717

@CodaBool
Copy link

sorry to comment on closed ticket but the docs weren't updated

https://zed.dev/docs/configuring-zed#show-whitespaces

@SomeoneToIgnore
Copy link
Contributor

Thanks for spotting another docs place, feel free to toss in the PR next time if you want to.
I've added the fourth option in 1248788 but since the list is quite brief, omitted the boundaries description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label]
Projects
None yet
Development

No branches or pull requests

4 participants