Can we add code formatting to the Inlay hints?

Answered

Hello, 

I'm trying to add add code formatting for the response which I get back from the server through CodeStyleManager. And also I'm trying to view the response as InlayHints using XDebuggerInlayUtil. Both works fine. Now I'm trying to add code formatting to the InlayHints, Is that Possible? I couldn't see any posts related to that. The spaces and new lines in the text aren't recognized by the inlayHints. 

I would really appreciate, if anyone can help me to get this?

 

Thanks.

1 comment
Comment actions Permalink

Please do not use com.intellij.xdebugger.impl.inline.XDebuggerInlayUtil, it's internal implementation.

Add your inlays via com.intellij.openapi.editor.InlayModel#addBlockElement() and then control rendering/appearance via provided EditorCustomElementRenderer.

0

Please sign in to leave a comment.