clutcher / bh

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

`Highlight keywords` feature does not work for class properties and constants #84

Closed javaDeveloperKid closed 7 months ago

javaDeveloperKid commented 7 months ago

Hi, PHP dev here. The "Highlight keywords" feature covers only methods. Properties and constants are not affected. I'm not sure if this is a bug or potential feature.

clutcher commented 7 months ago

@javaDeveloperKid Hi, this sounds more like a feauture, and I'm not sure if it is worth for implementation. Maybe I'll add properties support (https://github.com/clutcher/bh/issues/76), but not sure.

Can you use regexp highlighting instead?

javaDeveloperKid commented 7 months ago

It would be nice to have all class members of a given visibility highlighted. Then one can see entire public interface when moving through the class.

Can you use regexp highlighting instead?

I'am afraid I don't know what you're refering to.

clutcher commented 7 months ago

@javaDeveloperKid So you want to change color of word "public" on methods, properties, constants? And current settings allows to change color everywhere or only on methods?

By regexp I mean:

2023-11-26_20-45-33

It allows you to write custom regexp and highlight whatever you need.

javaDeveloperKid commented 7 months ago

I'm really sorry. I have had Highlight only in method definitions checkbox checked. I was playing with this option before but it didn't change a color for the props and consts back then. Now I can see that a file has to be reopened after turning on/off this checkbox. Also the checkbox's description was a bit misleading for me as it's example below says For example, "public" keyword would be highlighted on method signatures, but not on class definitions what at that moment I understood as it's either only methods or methods and classes and in PHP we don't have class visibility feature so I thought this checkbox is not useful for PHP language.

Thank you for your help.

clutcher commented 7 months ago

@javaDeveloperKid Can you suggest a better wording for that description, so it is more suitable for PHP?

javaDeveloperKid commented 7 months ago

If this checkbox is what I think it is i.e. if checked then it highlights a keyword only in method definition (signature) then I would remove this description because the checkbox's label is clear. If I had to change anything it would be to refresh open files after checkbox value changed (and Apply or Ok button was clicked). This was the root problem that finally lead to open this issue.

clutcher commented 7 months ago

@javaDeveloperKid Thanks, I'll think about that. Also I'll create a ticket to deal with root problem. I previously made few attempts to fix it, but there is not good API inside Intellij to trigger manually highlighting.