Zxynine / EvenBetterComments

My take on the better-comments extension which incorporates many pull requests and multi tag definitions
https://marketplace.visualstudio.com/items?itemName=Tion.evenbettercomments
MIT License
11 stars 1 forks source link

Monoline comment symbol still styled despite tagOnly being enabled #10

Closed Zxynine closed 1 year ago

Zxynine commented 1 year ago

@Fred-Vatin

The rendering for online comment is greedy. The comment symbol is styled too with "evenbettercomments.highlightTagOnly": true 205461361-9d8e7b2d-2f5e-45c9-9157-b3158de6aadc

Compared to multi lines comments 205461457-75a6c02f-71cc-4e35-9488-7bb1fc0248ef

Zxynine commented 1 year ago

Closing as complete until someone states otherwise.

Fred-Vatin commented 1 year ago

This one is still weird with monoline. Unexpected extra space before tag. Actually it styles every spaces between the comment symbol and the tag. image

Zxynine commented 1 year ago

@Fred-Vatin Thanks for the detailed info on all of the issues, it really helps me see and fix the problems quick. Have a go with this new update, hopefully I fixed the spaces now,

Fred-Vatin commented 1 year ago

v5.0.5 doesn’t work at all.

I reloaded the window as I always do to apply changes in the settings or after updating the extension. I haven’t changed anything since yesterday. image

Tried to change global settings to no avail. image

Zxynine commented 1 year ago

v5.0.5 doesn’t work at all.

I reloaded the window as I always do to apply changes in the settings or after updating the extension. I haven’t changed anything since yesterday. Tried to change global settings to no avail.

Hm now this is an odd one, you are doing that in a json file right? Do the comments work in any other language? If you open a C# or js or ts script they all use '//' for comments, this is the first time I have not been able to reproduce the problem.

Test with my typical settings image

Test with "highlightTagOnly" set to true: image

You might be able to open your "OUTPUT" tab in vscode and look to see if there are any large errors occuring from my extension. (Make sure you use the dropdown and go to extension host as shown below) image

Also I wouldn't recommend disabling "multilineComments" and "monolineCommnets" to try and fix things, those have the effect of basically disabling all parsing for those two types of comments and having both off at the same time effectively disables the extension. If they did anything to fix the problem then there is far more wrong with the extension than just some spacing problems lol.

Fred-Vatin commented 1 year ago

There is an error with 5.0.5. Not depending on file type. image

5.0.3 produces no error and works as before.

Zxynine commented 1 year ago

Perfect that was exactly what I needed, I know what went wrong for you and will have a fix out shortly.

I did some node.js module cleaning to publish and it seems in all of that json5 was removed from the dependencies list which caused vscode to not include it for you, im a bit foggy as to what vscode does behind the scenes with module depenencies but Id recon the discrepancy between our two situations is something like: I have json5 installed directly, not as a dependancy and so even though its not included in the depenancies, it can still be referenced? You however do not have it like that and so vscode probably cleaned it off of your modules and thats causing the extension to complain about not having it.

I have to do a push tonight anyhow to fix the versioning, fix performance problems #13, and ensure everyone has the correct dependencies so nobody else is having these issues, so it shouldn't be long. Sorry for the wait to have this fixed.

Fred-Vatin commented 1 year ago

5.0.6, same error image

Zxynine commented 1 year ago

5.0.6, same error image

Ive looked into it and it seems like there is potentially an issue with vscode not installing modules, I found a couple opened issues regarding something similar, there are three things we can do to try and fix this, the first is to have you uninstall the extension and re-install it, hoping that it will force vscode to fix its issues. The second option is you can go into the extension folder, found at: Windows %USERPROFILE%.vscode\extensions\tion.evenbettercomments-5.0.6 macOS ~/.vscode/extensions/tion.evenbettercomments-5.0.6 Linux ~/.vscode/extensions/tion.evenbettercomments-5.0.6 Once there, open the folder in vscode, go to the terminal, choose git-bash, and then use the command "npm install json5" and hope that forces the module to be installed on your machine. lastly, I can include all my node modules in a new update for the extension which would be about 3k javascript files and may potentially impact performance a bit, but should ensure you have the proper module.

Zxynine commented 1 year ago

I just pushed a hotfix that includes all modules in the code, hopefully, if that does not work, give the other two options a try and let me know.

UPDATE:

I just installed the update and checked, the folder does now contain a modules folder, and it seems like all of the cleaning I did helped, there are no other folders included in the modules folder other than json5, so I was wrong, it isnt 3k js files, that was a figure I got back before I did the cleaning. Hopefully you should be good to go now! Vscode makes me want to cry sometimes ;-;

Fred-Vatin commented 1 year ago

Just updated and it worked.

image