Don't show invisibles from inlays (#32088)

Closes #24266

Release Notes:

- Whitespace added by inlay hints is no longer shown when
`"show_whitespaces": "all"` is used.

-
This commit is contained in:
Conrad Irwin 2025-06-04 10:33:22 -06:00 committed by GitHub
parent 7d54d9f45e
commit 2c5aa5891d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 1 deletions

View file

@ -1259,6 +1259,8 @@ pub struct Chunk<'a> {
pub underline: bool,
/// Whether this chunk of text was originally a tab character.
pub is_tab: bool,
/// Whether this chunk of text was originally a tab character.
pub is_inlay: bool,
/// An optional recipe for how the chunk should be presented.
pub renderer: Option<ChunkRenderer>,
}
@ -1424,6 +1426,7 @@ impl<'a> Iterator for FoldChunks<'a> {
diagnostic_severity: chunk.diagnostic_severity,
is_unnecessary: chunk.is_unnecessary,
is_tab: chunk.is_tab,
is_inlay: chunk.is_inlay,
underline: chunk.underline,
renderer: None,
});

View file

@ -336,6 +336,7 @@ impl<'a> Iterator for InlayChunks<'a> {
Chunk {
text: chunk,
highlight_style,
is_inlay: true,
..Default::default()
}
}