crystal-lang-tools / vscode-crystal-lang

Yet another VSCode extension for Crystal Programming Language
https://marketplace.visualstudio.com/items?itemName=crystal-lang-tools.crystal-lang
MIT License
276 stars 58 forks source link

Weird syntax highlighting #105

Closed andraantariksa closed 3 years ago

andraantariksa commented 4 years ago

Screenshot_2020-02-29_16-25-39

faustinoaq commented 4 years ago

Hi @andraantariksa

I can confirm the weird syntax in (two_byte << 8) | (two_byte >> 8)

Here some captures:

Right behavior? https://carc.in/#/r/8t1b

image

VSCode Default Dark+ Theme

image

VSCode One Dark Pro Theme

image

VSCode One Dark Theme

image

I think this may be some issue with crystal.json converted from Crystal.tmLanguage

I tested this extension using Crystal.tmLanguage and looks like this:

image

VSCode Dark+ theme:

image

VSCode One Dark Pro Theme:

image

VSCode One Dark Theme:

image

A workaround could be replacing crystal.json by original Crystal.tmLanguage based on Ruby.

WDYT?

andraantariksa commented 4 years ago

The first one looks better for me. From what I see in C++ language syntax highlighting, the variable that coming from function argument will be in red color and the other variable will be in white.

VSCode One Dark Pro Theme

https://imgur.com/o5RJItX.png