Sarrus1 / sourcepawn-studio

VSCode extension for SourcePawn scripting
https://sarrus1.github.io/sourcepawn-studio/
MIT License
140 stars 22 forks source link

code coloring issues #341

Closed ProjectSky closed 10 months ago

ProjectSky commented 11 months ago

Basic informations

Further Information

image

To Reproduce

idk how it happened, I just opened working directory and edited some script files

Code to reproduce the behaviour

Expected behaviour

Error messages

Sarrus1 commented 10 months ago

Thank you for reporting.

Does this eventually go away? What happens if you restart the server?

ProjectSky commented 10 months ago

Thank you for reporting.

Does this eventually go away? What happens if you restart the server?

202310022144

Sarrus1 commented 10 months ago

Thanks, can you send me the project you are working on so that I can reproduce please?

ProjectSky commented 10 months ago

Thanks, can you send me the project you are working on so that I can reproduce please?

here is the working directory/code to reproduce this issue sp.zip

Sarrus1 commented 10 months ago

Weird it does not happen for me... Can you try on v6.1.0? I fixed a lot of preprocessor stuff.

ex
Sarrus1 commented 10 months ago

Moving the symbolRequest bug to #345.

ProjectSky commented 10 months ago

Weird it does not happen for me... Can you try on v6.1.0? I fixed a lot of preprocessor stuff.

Strange, I'm using v6.1.0, I'll switch to a clean environment and retest it.

Sarrus1 commented 10 months ago

Can you try setting the logs to DEBUG as well?

ProjectSky commented 10 months ago

Can you try setting the logs to DEBUG as well?

debug.txt

Sarrus1 commented 10 months ago

Ok two more things:

ProjectSky commented 10 months ago

Ok two more things:

  • Your includesDirectories setting is empty, is it intentional?
  • Do "ctrl + shift + p" and type "debug pre sourcepawn". And send me the output please.

1: yes (nothing will change even if I set it) 2: unknown command debug pre sourcepawn

image

trace.txt

Sarrus1 commented 10 months ago

Sorry I mixed up the name:

https://github.com/Sarrus1/sourcepawn-vscode/blob/main/editors/code/package.json#L136

Should be "reveal preprocessed document"

ProjectSky commented 10 months ago

Sorry I mixed up the name:

https://github.com/Sarrus1/sourcepawn-vscode/blob/main/editors/code/package.json#L136

Should be "reveal preprocessed document"

trace.txt

Sarrus1 commented 10 months ago

Thanks, can you also send a screenshot of your screen? I think the command opens a panel on the right. I need the two documents side by side please.

The output you sent me is encoded in utf-8 so the chinese characters are not properly rendered :/

ProjectSky commented 10 months ago

Thanks, can you also send a screenshot of your screen? I think the command opens a panel on the right. I need the two documents side by side please.

The output you sent me is encoded in utf-8 so the chinese characters are not properly rendered :/

image

Sarrus1 commented 10 months ago

Ok so on the screenshot the coloring errors are because the macros are expanded and the servers "sees" the tokens that were expanded. This I can fix.

But on the very first screenshot you sent, the highlighting errors are not on the same line as the macros, can you send a screenshot where there is a highlighting error on a line that does not have a macro please?

ProjectSky commented 10 months ago

It seems that code highlight issues only occur after macros

Sarrus1 commented 10 months ago

Ok this was probably fixed in 0.12.0 of the LSP, with either the deadlock fix or the preprocessor fix. I am closing this issue, but if the bug reappears on a line that does not have a macro, please feel free to reopen this issue.

I am tracking the macro line highlight issue in #333.

Thank you for all the debug information 🚀

ProjectSky commented 10 months ago

Thank you for your hard work. By the way, I'd like to offer some support, but buymeacoffee cannot be used in China (:

Sarrus1 commented 10 months ago

Thanks! I have a paypal as well: omegasix0611@gmail.com

Glad you like the extension!

ProjectSky commented 10 months ago

Thanks! I have a paypal as well: omegasix0611@gmail.com

Glad you like the extension!

paypal: Sorry, this recipient can’t accept payments right now :(

ProjectSky commented 10 months ago

Oh crap right, try: charleszablit@gmail.com

Done

Sarrus1 commented 10 months ago

Thank you!