clutcher / bh

Issue tracker for Better Highlights Intellij IDEA plugin
8 stars 0 forks source link

Ability to highlight whole line simmilar to bookmarks #139

Open karol-bujacek opened 2 months ago

karol-bujacek commented 2 months ago

I would like to highlight whole line in my source code. Currently I am using bookmark functionality in the IDEA, but I am not able to customize styles, etc.

This plugin allows to fully customize the style of highlight, but as far as I know, I need to comment the line, which is not desirable.

My use case is to mark lines during the refactoring process to see what lines are refactored, should be removed, etc. Commenting lines might be problematic, because a lot of errors might be visible immediately. My naive idea is that plugin might highlight after I press a defined shortcut key, completely without editing the actual source code.

clutcher commented 2 months ago

@karol-bujacek Your naive idea would not work, as highlight would be attached to line number, so if you would remove/add code before highlighted line it would start highlighting a different code. There should be more "static" anchor, like function call or variable name etc, but I think that such implementation wouldn't be really helpful.

Most probably the best idea is to extend bookmark functionality to change color of bookmarked lines. I need to think about that and check if it is even possible to implement.


Why you are commenting out the source code line itseld? I usually create a new commented line above required code, something like // ! Refactor, also you can use wikilink functionality to link between classes/methods, like // ! Refactor before removing [[SomeClass#someMethod]].