Skip to content

Commit

Permalink
Add a tooltip for inlay hints
Browse files Browse the repository at this point in the history
  • Loading branch information
jiribenes committed Nov 7, 2024
1 parent f715b94 commit 92dc08a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ class EffektCapturesProvider implements vscode.InlayHintsProvider {
log("... URI correct => creating a hint!")
const position = response.location.range.start;
const hint = new vscode.InlayHint(position, response.captureText, vscode.InlayHintKind.Type);
hint.tooltip = undefined; // NOTE: We could add a tooltip here if we wanted one.

// This tooltip is useful when there are a lot of captures.
hint.tooltip = new vscode.MarkdownString(`Captures: ${response.captureText}`);
hint.paddingRight = true;
hint.paddingLeft = false;
inlayHintCache[document.uri.toString()].push(hint);
Expand Down

0 comments on commit 92dc08a

Please sign in to comment.