Open schittli opened 1 year ago
@schittli So if you will add in Better Highlights region tokens in lowercase, then you can achieve desired functionality?
As for proposals:
Hello @clutcher
So if you will add in Better Highlights region tokens in lowercase, then you can achieve desired functionality?
Yes, if I use source code region tokens in lowercase, then PyCharm recognizes the regions and allows to fold them (but Better Highlights does not highlight the regions)
If I use source code region tokens in uppercase, then PyCharm does not recognizes the regions (but Better Highlights highlights them)
I had not seen that we can define the Better Highlights tokens in the settings. Therefore, this bug report was created with this configuration:
So I just tested it now and changed the tokens to region
and end
but Better Highlights was still not able to detect the regions in the Python source code (this might not work because I work in freemium mode, I've got a warning)
then custom regex would really help, because users work with different file types (html, css, python, etc.) and with a custom Regex they cold configure an expression which works with all their file types đ
Thanks a lot, kind regards, Thomas
@schittli Region works same in free and paid version. I'll take a look why it doesn't work with lower case region and end keyword.
@schittli Just checked and do not see any issues:
@schittli Can you recheck and confirm if you can use that approach untill I'll put more robust settings?
Good afternoon
I have found another, probably small issue in PyCharm for Python source files:
If a Region is declared with upper case char (
# Region Init-Section âĻ # Endregion Init-Section
), then: âī¸ Better Highlights recognizes the region â PyCharm does not recognize the region and, therefore, does not allow to fold it đĸIf a Region is declared with lower case char (
# region Init-Section âĻ # endregion Init-Section
), then: ī¸â Better Highlights does not recognize the region âī¸ PyCharm perfectly recognize the region and allows to fold it đI propose that: a) Users can configure if Better Highlights recognizes Region declarations case sensitive / insensitive b) That Better Highlights always recognizes Region declarations case insensitive b) or: that Users can define regular expressions to recognize start and end of regions
Thanks a lot, kind regards, Thomas