0verEngineer / InlineProblems

Plugin to show problems inside the text editor for IDEs based on the IntelliJ Platform
GNU General Public License v3.0
61 stars 7 forks source link

Feature Request: Right-Justify Inline Problems in the Editor #57

Open risangbaskoro opened 4 months ago

risangbaskoro commented 4 months ago

Hi Julian,

First, I want to express my appreciation for your plugin. It allows me to quickly inspect my code without needing to press ⌘ + 6 every time. I find the customization options provided by the plugin very useful.

I would like to request a new feature for customization: the ability to justify inline problems to the right side of the editor.

Currently, the inline problem is displayed directly next to the line containing the issue, as shown below:

image

I believe it would be a great feature to allow the error to be justified to the right side of the editor. Here is an illustration of how it might look:

SCR-20240625-qwzr

This idea is inspired by the way XCode handles problems:

image

Is it possible to implement this feature? Please let me know your thoughts on this request.

Thank you!

0verEngineer commented 4 months ago

Hey, thanks a lot for the compliments and the feature request, i also have this feature on my Joplin list because i find it very cool how XCode does it. I don't have that much time at the moment but i will try to create a POC in the next few weeks.

0verEngineer commented 4 months ago

It seems that for the com.intellij.openapi.editor.InlayModel every line is just as long as the text in it + 1, so if i try to paint an Inlay with a offset higher than the line length it will be painted in the next line when i use addAfterLineElement or addInlineElement. So it is not possible to paint inlays at the right side of the editor window using the InlayModel.

If you / someone knows any open source plugin which draws things into the text editors of the IDE at the very right please let me know.

I have asked in the plugin developer slack channel as well if there is any other way, hopefully there is one..