-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat: Provide InlayHint for property expression in microprofile-config.properties #972
Conversation
988a3c2
to
b3fa3c5
Compare
f997706
to
68968fe
Compare
By default inlay hint for microprofile-config.properties are enabled, but of you don't want that, you can now disabled with UI settings: You can now disable URL codelens if you wish: Please note once you have changed th eenable/disable state you need to type something in the editor, because MicroProfile LS doesn't react to this settings changed (it should send an LSP refreshCodeLens and refreshInlayHint). I created the issues: |
relates to #794 |
@angelozerr: functionwise things work fine for me. I'm current reviewing the code. In |
Indeed it looks better. Thanks! It should be nice if you could do the same thing for codelens (in an another PR). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Added a commit where I tried to improve code readability.
private InlayPresentation toPresentation(Editor editor, int offset, | ||
@NotNull | ||
private static Range getViewPortRange(Editor editor) { | ||
Position start = new Position(0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems wrong. The viewport's start range won't start from 0, if the editor was scrolled down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which means you're likely unnecessarily computing hidden inlayhints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did that because the inlay hint is not refreshed when you are scrolling. Vscode provides this feature because when you scroll it refreshes the inlay hint. IJ doesn't support that it means that you need to consider that view port is the full document and not the visual view port.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment then, as it's not obvious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I have add a comment
microprofile-config.properties (redhat-developer#971) Fixes redhat-developer#971 Signed-off-by: azerr <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Tested on IC-2021.3 and EAP |
feat: Provide InlayHint for property expression in microprofile-config.properties (#971)
Fixes #971