clutcher / bh

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

Plugin doesn't work in version 2024.1.28 #127

Open whiskey-emerald opened 1 week ago

whiskey-emerald commented 1 week ago

The plugin doesn't work for me in version 2024.1.28 which seems to be an issue for some other users (judging by the comments on the plugin page). I'm using PyCharm version 2024.1.4. By not working I mean that it's as if the plugin isn't even installed, no keyword/comment token highlighting, cognitive complexity doesn't show etc. I tried adding the tokens again, replacing them, reinstalling the plugin. Nothing works.

clutcher commented 1 week ago

@whiskey-emerald Don't see any issue in my PyCharm and Idea. Can you provide a list of installed plugins? Myabe there is a conflict between plugins. And what OS are you using?

whiskey-emerald commented 1 week ago

@clutcher I'm using win 11, Version 10.0.22631 Build 22631. Regarding plugins: I tried disabling them to see if they conflicted, but it didn't change anything for me. The plugin used to work fine, but broke with the recent update it seems.

Here are the plugins I specifically installed: Better Highlights (2024.1.28) GitHub Copilot (1.5.13.5971) One Dark Theme (5.11.0)

And here's the list of plugins shipped with the IDE: Database Tools and SQL (241.18034.82) dbt Support (241.18034.82) Docker (241.18034.82) FTP/SFTP/WebDAV Connectivity (241.18034.82) Puppet (241.18034.82) Remote Execution Agent (241.18034.82) Vagrant (241.18034.82) HTML Tools (241.18034.82) Settings Sync (241.18034.82) Angular (241.18034.82) JavaScript and TypeScript (241.18034.82) JavaScript Debugger (241.18034.82) JavaScript Intention Power Pack (241.18034.82) JSONPath (241.18034.82) Karma (241.18034.82) Next.js (241.18034.82) Node.js (241.18034.82) Node.js Remote Interpreter (241.18034.82) Polymer & Web Components (241.18034.82) Prettier (241.18034.82) React (241.18034.82) Styled Components & Styled JSX (241.18034.82) Stylelint (241.18034.82) TSLint (241.18034.82) Vite (241.18034.82) Vue.js (241.18034.82) Webpack (241.18034.82) Gherkin (241.18034.82) GNU GetText Files Support (*.po) (241.18034.82) Ini (241.18034.82) Markdown (241.18034.82) Properties (241.18034.82) QML (241.18034.82) Shell Script (241.18034.82) YAML (241.18034.82) Full Line Code Completion (241.18034.82) Machine Learning Code Completion (241.18034.82) Machine Learning in Search Everywhere (241.18034.82) Endpoints (241.18034.82) HTTP Client (241.18034.82) OpenAPI Specifications (241.18034.82) Dev Containers (241.18034.82) Remote Development Gateway (241.18034.82) CSS (241.18034.82) Less (241.18034.82) PostCSS (241.18034.82) Sass (241.18034.82) Tailwind CSS (241.18034.82) GitHub Color Scheme (241.18034.82) Monokai Color Scheme (241.18034.82) Twilight Color Scheme (241.18034.82) WarmNeon Color Scheme (241.18034.82) Git (241.18034.82) GitHub (241.18034.82) GitLab (241.18034.82) Mercurial (241.18034.82) Perforce Helix Core (241.18034.82) Subversion (241.18034.82) Code With Me (241.18034.82) Copyright (241.18034.82) Diagrams (241.18034.82) Django (241.18034.82) EditorConfig (241.18034.82) File Watchers (241.18034.82) Grazie Lite (241.18034.82) IDE Features Trainer (241.18034.82) IntelliLang (241.18034.82) Jupyter (241.18034.82) Package Checker (241.18034.82) Performance Testing (241.18034.82) PyScript (241.18034.82) Qodana (241.18034.82) Qt (241.18034.82) Shared Project Indexes (241.18034.82) Task Management (241.18034.82) Terminal (241.18034.82) TextMate Bundles (241.18034.82) Time Tracking (241.18034.82)

clutcher commented 1 week ago

@whiskey-emerald Thanks for additional info. I'll take a look on it and will fix asap.

sharkiller commented 1 week ago

Yep, doesnt work on plain text anymore (dont know of anything else, because I use it on plain text files). PHPStorm 2023.2.3

clutcher commented 1 week ago

@whiskey-emerald Is there any exceptions when you open IDE? I checked on Windows with same plugins and don't see any issues.

@sharkiller what characters do you use as comment start sequence in plain files?

whiskey-emerald commented 1 week ago

@clutcher Unfortunately, no, no exceptions. However, I did realise that my issue wasn't as global as I thought. So the plugin works fine with normal comments starting with the #, all highlighting rules work as expected. However, the plugin doesn't recognise anything in docstrings, i.e. """""". It used to work fine but with the new update the plugin doesn't see tokens inside the docstring.

I'm sorry for not identifying the issue correctly from the start.

Edit: I've realised that the plugin actually does recognise the tokens at the start of the string, however, it applies the highlighting to the whole text, and only recognises the token at the start of the string, not inside of it. Whereas before it used to colour just the line where the token appears, which was the behaviour that I wanted. So I'm actually not sure now if everything's working as expected or not

sharkiller commented 1 week ago

@clutcher image

whiskey-emerald commented 1 week ago

@clutcher Wanted to better illustrate the behaviour that I'm encountering. So I set up comment tokens to highlight Google style docstrings, in previous versions it would highlight the relevant lines inside of the docstring. However, in the new version, inside the docstring nothing gets highlighted. I can get the highlighting if I put the comment token at the beginning of the string. Then it highlights the whole text. image image image

clutcher commented 1 week ago

@whiskey-emerald This is a bug. Plugin should be able to work with each line in doc comment separately.

@sharkiller Thanks, looks like you are using # as comment token for plain files. I also found a bug in comment resolving in plain files.

Will fix both issues in next release, which should be available for update in the begging of next week.

clutcher commented 6 days ago

@sharkiller @whiskey-emerald Can you check with latest 2024.1.29 version? Hopefully everything is fixed now.

@sharkiller Most probably, you need to adjust tokens and remove "#" from them. Now, #, // and -- are considered as comment lines in plain text files.

whiskey-emerald commented 6 days ago

@clutcher Yes, the issue is fixed for me. Thank you!

sharkiller commented 6 days ago

@clutcher that fix nothing. I need different colours for lines that start with # followed by a word. It was working perfectly fine, why i need to delete # from them? Also updated and not a single token work life before. Just plain normal text.

clutcher commented 5 days ago

@sharkiller Looks like I totally misunderstood your problem. Can you give me example of plain text file and expectation of how it should be highlighted?

sharkiller commented 5 days ago

@clutcher this was working perfectly fine until a few weeks ago that an update just make everything plain text like there is nothing working.

image image

clutcher commented 5 days ago

@sharkiller Interesting. It was never supposed to work in such way))

Right now you can partilally fix things (except "http" and "#") by just removing leading "#" from token definition. I will think what to do with "http" and "#", most probalby I would introduce one more property: "consider any lines as comment line in plain text file, not just the one, which starts with //, -- or #".

sharkiller commented 5 days ago

what the point of tokens if you have predefined ones? why broke something that was already working. it literally say "or sequence at the beginning of comment"

clutcher commented 5 days ago

@sharkiller The main word in sentence you copy-pasted is "comment". What is "comment" in plain text file? Initially I defined it as line, which start with //, # or --. There were few bugs in code, which leads to considering any line in plain text file as "comment", so you basically rely on "bug" to get desired highlighting. Now that set of bugs are fixed and everything works according to my expectations.

Returning to your example. I understood what you need, that request looks legit for this plugin and now I need time to implement it. Most probably at the begining of the next week I would release something, what would allow you to get back desired highlighting.

clutcher commented 1 day ago

@sharkiller Can you check version 2024.1.30? I added there one more setting checkbox to consider any line in plain text file as commented line.

P.S. During the implementation I realized that there is more sense to use RegExp instead of introducing that new setting.

sharkiller commented 1 day ago

@clutcher now it works almost like before it breaks. But some lines have overwrites keywords styles even when the line dont start with that keyword.

For example the bottom lines should be all orange. not start with orange and change to green. image image

The problem with regex is the performance. Having multiple keywords for plain text files that have thousand of lines is going to be taxing.

clutcher commented 1 day ago

@sharkiller Looks like a bug)