joelcancela / VSCode-cfg-support

VSCode extension that adds syntax highlighting for .cfg files for Valve games and others.
MIT License
4 stars 1 forks source link

Numbers in quotes are always light green as of 0.3.0 #5

Closed bigfinfrank closed 2 years ago

bigfinfrank commented 2 years ago

Numbers in quotes are always showing up as light green after updating to 0.3.0 (similarly to #4 with .s). image

joelcancela commented 2 years ago

This one I did it on purpose, I thought it would be great to have numbers highlighted when between quotes, but maybe I can make this less agressive and only highlight numbers when not surrounded by words for example

joelcancela commented 2 years ago

Reverted in 6d32139ee2701f2b0a30f1ecfd788c4d5e2f5e04 and published as 0.3.1

bigfinfrank commented 2 years ago

I do definitely agree with having them highlighted and making it a bit less aggressive. I found it pretty useful in situations with aliases like this: image However in other places like the examples in line 1 through 5, it's highlighting in a way I wasn't expecting. Only highlighting them as numbers if they're bordered on either side by quotes or whitespace might be a nice middleground?

joelcancela commented 2 years ago

I do definitely agree with having them highlighted and making it a bit less aggressive. I found it pretty useful in situations with aliases like this: image However in other places like the examples in line 1 through 5, it's highlighting in a way I wasn't expecting. Only highlighting them as numbers if they're bordered on either side by quotes or whitespace might be a nice middleground?

I will implement this later, this looks like a good way :)

joelcancela commented 2 years ago

0.3.2 published with better number support, enjoy

bigfinfrank commented 2 years ago

Still having some unexpected results on 0.3.2 🤔 image image

joelcancela commented 2 years ago

Another good catch, let's go 0.3.3