Closed Lennon925 closed 5 years ago
Hello @Lennon925 , Speaking of bug you've found, I suppose I've fixed it. Have you encountered this output in very short file? Please, check out the latest update. New version is cross-platform, so you can install it from Marketplace (directly from VSCode). Just in case you were using .vsix packages from Github. Regarding your question about different colors. Tree-sitter parser, used by Syntax Highlighter, builds entire syntax tree of source file, in contrast to conventional regex parsers. Therefore, it knows surrounding context and can properly identify syntax terms, overcoming limitations of regex. But it's still only syntax parser, it doesn't know anything about things defined in other project files, this is task for language servers. So it's just impossible to tell either some term is class or struct, syntactically they are equivalent.
Hello @Lennon925 , Speaking of bug you've found, I suppose I've fixed it. Have you encountered this output in very short file? Please, check out the latest update. New version is cross-platform, so you can install it from Marketplace (directly from VSCode). Just in case you were using .vsix packages from Github. Regarding your question about different colors. Tree-sitter parser, used by Syntax Highlighter, builds entire syntax tree of source file, in contrast to conventional regex parsers. Therefore, it knows surrounding context and can properly identify syntax terms, overcoming limitations of regex. But it's still only syntax parser, it doesn't know anything about things defined in other project files, this is task for language servers. So it's just impossible to tell either some term is class or struct, syntactically they are equivalent.
You are right. I tried Syntax Highlighter 0.20 which is downloaded from extension marketplace, it's OK.
@EvgeniyPeshkov Hi , I tried syntax-highlighter and I want to set different colors for macro/strcut/Enum/Union variables and local/global variables. Is there a way to set or change source code to add this new feature?
In addition, I found a bug, maybe you can fix it easily. Capture as below:![1](https://user-images.githubusercontent.com/39362073/58306175-418e8c80-7e2d-11e9-8e92-57e0a878da60.PNG)
Look forward to your reply.