Inlay Hint using WithAttributesPresentation disables OnHoverPresentation
已回答
If I have an InlayPresentation which just displays some text in red, for example:
val errorTextPresentation = WithAttributesPresentation(factory.smallText("Uh oh..."), CodeInsightColors.WRONG_REFERENCES_ATTRIBUTES, editor)
And then want to be able to hover and click on that text, I use this:
factory.referenceOnHover(errorTextPresentation) { event, _ ->
...
}
And I'd expect the red text to turn blue on hover. This works if I use:
val errorTextPresentation = factory.smallText("Uh oh...")
But with that, the small text won't start red. Is it possible to have the hover effect when using AttributesPresentation or is that not supported?
I'm testing on PHPStorm 2022.3 (using the new UI)
Thanks!
请先登录再写评论。
Please do not crosspost the exact same question.
Hello!
It is possible to achieve what you want using flags: