Skip to content

fix: separate user tag parameters inlay hint - #968

Merged
fbricon merged 1 commit into
redhat-developer:masterfrom
angelozerr:separate_usertagparam
Jul 10, 2024
Merged

fbricon merged 1 commit into
redhat-developer:masterfrom
angelozerr:separate_usertagparam

Conversation

@angelozerr

@angelozerr angelozerr commented Jul 10, 2024 •

Copy link
Copy Markdown
Contributor

fix: separate user tag parameters inlay hint

This PR uses the paddingRight property of inlay hint to separate user tag parameters.

Here the result of vscode:

image

We will have to support this property in LSP4IJ.

@angelozerr angelozerr added enhancement New feature or request inlay hint labels Jul 10, 2024
@angelozerr angelozerr self-assigned this Jul 10, 2024
@angelozerr angelozerr added this to the 0.19.0 milestone Jul 10, 2024
@fbricon
fbricon merged commit df3dcbb into redhat-developer:master Jul 10, 2024
@fbricon

fbricon commented Jul 10, 2024

Copy link
Copy Markdown
Collaborator

Thanks @angelozerr

@angelozerr angelozerr added bug Something isn't working and removed enhancement New feature or request labels Aug 20, 2024
lagergren added a commit to redhat-developer/lsp4ij that referenced this pull request Nov 25, 2026
…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 #462
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working inlay hint

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants