IntelliJ-Inspection-Lens icon indicating copy to clipboard operation
IntelliJ-Inspection-Lens copied to clipboard

Color configuration

Open synopss opened this issue 2 years ago • 5 comments

The idea is to start creating configuration for the plugin. Best way to start : Color customization.

I've worked on a poc already, it will need to rethink the color system by using TextAttributesKeys configurable with xml files.

image

For now, nothing is linked to the plugin, it's just some UI work. See : https://github.com/synopss/IntelliJ-Inspection-Lens/tree/feat/settings

synopss avatar Jun 06 '23 21:06 synopss

Having the option to disable the background color would be a good start. The easiest solution is probably to inherit some already existing color settings but I think a standalone color setting for the plugin would be better in case you want to have different colors for actual warnings within the code.

rlnt avatar Jun 07 '23 12:06 rlnt

Disable the background color would be possible with the solution above, you can just uncheck it, which will remove it. And since every gravity is handled separately, you will be able to combine some errors with background color and other without.

Also, I am not sure to understand your second point, can you elaborate more ?

synopss avatar Jun 07 '23 13:06 synopss

I thought about it and with the background line colors I made the call to not add customization, primarily because every single thing that's in this plugin becomes my responsibility to not only test - which gets tricky with customization options - but also be expected to maintain basically forever... so for now, any customization is probably best left for a community fork.

chylex avatar Jun 07 '23 15:06 chylex

Understandable, I'll stop there then. I'll keep the fork open so you change your mind, you'll have some kind of basis if you need one.

synopss avatar Jun 07 '23 16:06 synopss

Forget what I said synopss. But I'd really like to use your fork with the customization option then. Would you publish a release on it so I don't have to build it myself? :)

rlnt avatar Jun 07 '23 17:06 rlnt

I'm wondering what is the reason for wanting color customization in the first place, because specific problems such as:

  • "I customized the colors in 'Color Scheme - Errors and Warnings' and now the default colors in the plugin don't match" or
  • "The plugin doesn't work well with a high contrast theme"

can be solved without the users having to customize every color in the plugin.

chylex avatar Dec 27 '24 14:12 chylex

I agree that it’s not particularly important. My perspective is simple: some people enjoy customizing things. Is it mandatory? Definitely not. Is it a nice-to-have? Probably.

As you pointed out, allowing customization might lead to users choosing odd color combinations, but that’s not really the plugin’s responsibility.

synopss avatar Dec 29 '24 21:12 synopss

You can already customize colors of error stripe marks or underlines for both standard and user-defined inspections though, to me it would make more sense for the plugin to adapt to those colors instead.

I have started an experiment in that area, not sure if/when I'll have any results.

chylex avatar Dec 30 '24 02:12 chylex