-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
community championIssues filed by our amazing community champions! 🫶Issues filed by our amazing community champions! 🫶
Description
Description
When hovering over a clickable inlay hint (one with InlayHintLabelPart.location set), the hover highlight/underline doesn't extend to the last character of the label text. For example, if the label is → app/Livewire/UserProfile.php, the final p is not highlighted.
Steps to Reproduce
- Create an LSP server that returns inlay hints with clickable
InlayHintLabelPartlabels (see code below) - Open a file that triggers the inlay hint
- Hover over the inlay hint to see the clickable highlight
- Observe that the last character is not included in the highlight
Expected Behavior
The entire label text should be highlighted when hovering, including the last character.
Actual Behavior
The highlight/underline stops one character short, leaving the final character unhighlighted.
Minimal LSP Response
The inlay hint returned by the LSP server:
{
"position": { "line": 0, "character": 0 },
"label": [
{
"value": "→ app/Livewire/UserProfile.php",
"tooltip": "Cmd+Click to open: app/Livewire/UserProfile.php",
"location": {
"uri": "file:///path/to/app/Livewire/UserProfile.php",
"range": { "start": { "line": 0, "character": 0 }, "end": { "line": 0, "character": 0 } }
}
}
],
"kind": 1,
"paddingLeft": false,
"paddingRight": true
}Rust LSP Server Code (using tower-lsp 0.20)
hints.push(InlayHint {
position: Position { line: 0, character: 0 },
label: InlayHintLabel::LabelParts(vec![InlayHintLabelPart {
value: format!("→ {}", display_path),
tooltip: Some(InlayHintLabelPartTooltip::String(
format!("Cmd+Click to open: {}", display_path)
)),
location: target_uri.map(|uri| Location {
uri,
range: Range::default(),
}),
command: None,
}]),
kind: Some(InlayHintKind::TYPE),
text_edits: None,
tooltip: None,
padding_left: Some(false),
padding_right: Some(true),
data: None,
});Environment
- Zed version: v0.216.1+stable.95.81870d5cf77d61d40ec526a37141ebe3a74318ca
- OS: macOS 26.1
- Architecture: aarch64
- Memory: 64 GiB
- LSP: Custom LSP using tower-lsp 0.20, lsp-types 0.94
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
community championIssues filed by our amazing community champions! 🫶Issues filed by our amazing community champions! 🫶