Repository navigation
Conversation
…the left or the right LSP4IJ ignored the paddingLeft and paddingRight of an inlay hint, so a hint which its language server asks to keep apart from the text, as the Qute language server does for the parameters of a user tag (redhat-developer/quarkus-ls#968), touched it. The declarative inlay API has no margin for one side: its HintMarginPadding, the same in 2024.2, 2025.3 and 2026.3, is the same on both sides. So an inlay hint now has a space before its label when it asks for paddingLeft, and after it when it asks for paddingRight, as VS Code leaves a small gap on that side. The space is a text of its own, so a long label, which IntelliJ shortens to 30 characters, never loses it, and it is not part of a clickable label part. The format of the hint does not change, and a hint without padding shows only its label, as before. Unlike in VS Code, the gap is within the hint's background. Fixes redhat-developer#462
|
Warning Review limit reachedThis review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Next included review available in 23 minutes. View limit details
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2210 +/- ##
==========================================
+ Coverage 54.59% 54.74% +0.14%
==========================================
Files 834 834
Lines 35385 35393 +8
Branches 7300 5547 -1753
==========================================
+ Hits 19320 19376 +56
+ Misses 13223 13174 -49
- Partials 2842 2843 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Combined, unchanged, with the other small fixes into #2219, one commit each, so that they take one review instead of six. |
Fixes #462
What
LSP4IJ ignored an inlay hint's
paddingLeftandpaddingRight. A hint sat right against the text next to it, as Qute's tag-parameter hints do (quarkus-ls #968).Change
LSPInlayHintsProvider.buildWithPaddingadds a space before the label forpaddingLeft, and after it forpaddingRight, for plain and multi-part labels.HintMarginPaddingis symmetric.docs/LSPSupport.mdmentions the padding.Not in this PR: VS Code draws a transparent gap outside the hint's background, while ours is a space of the hint's font, inside the background.
Tests
New
InlayHintPaddingTest(7 tests): left, right, both, null and false padding; a parameter hint keeps its format; and a multi-part label whose spaces aren't clickable.Behaviour change