editor: Render boundary whitespace (#11954)
 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](https://github.com/zed-industries/zed/issues/4290)). --------- Co-authored-by: Nicholas Cioli <nicholascioli@users.noreply.github.com>
This commit is contained in:
parent
63a8095879
commit
0289c312c9
2 changed files with 102 additions and 19 deletions
|
@ -391,6 +391,13 @@ pub enum ShowWhitespaceSetting {
|
|||
None,
|
||||
/// Draw all invisible symbols.
|
||||
All,
|
||||
/// Draw whitespace only at boundaries.
|
||||
///
|
||||
/// For a whitespace to be on a boundary, any of the following conditions need to be met:
|
||||
/// - It is a tab
|
||||
/// - It is adjacent to an edge (start or end)
|
||||
/// - It is adjacent to a whitespace (left or right)
|
||||
Boundary,
|
||||
}
|
||||
|
||||
/// Controls which formatter should be used when formatting code.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue