Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spring Data Queries] Show inline hint for query parameter #1333

Closed
BoykoAlex opened this issue Aug 23, 2024 · 5 comments
Closed

[Spring Data Queries] Show inline hint for query parameter #1333

BoykoAlex opened this issue Aug 23, 2024 · 5 comments
Labels

Comments

@BoykoAlex
Copy link
Contributor

All Spring Data Query whether it is JPQL/HQL or a native SQL query support parameters coming from java code. Typically @query annotates a method, then :1 or ?2 found in the query would stand for the first and second parameter of the Java method respectively. It's be useful to show the name of the Java method parameter as inline hint to indicate which parameter the number corresponds to

@BoykoAlex
Copy link
Contributor Author

Fixed with 0063608 but doesn't seems that it is only useful for parameter ordinal

@martinlippert
Copy link
Member

I've seen this working, but the end result doesn't look great to me. The code part :1% ends up looking like :1 lastname%. It seems to me like the inlay hint should be shown behind the % probably, with a little spacing behind the code lens in addition to the little space before the code lens.

@BoykoAlex
Copy link
Contributor Author

Hmm... there is already space dedicated left of the inlay... Don't think LSP4E respects it properly...Perhaps we may need to remove the inlays - I didn't like them either to be honest.

@martinlippert
Copy link
Member

I tried VSCode only for the moment, the space between :1 and lastname looks good to me, but I would move the hint entirely behind the % character, with spacing before and after.

@BoykoAlex
Copy link
Contributor Author

The PR for LSP4E inlay hint padding issue: eclipse-lsp4e/lsp4e#1089
Corrections to positioning of inlay hint on our side: fb072bf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants