Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some consistent characteristics of highlight #39

Closed
Wuqiqi123 opened this issue Mar 20, 2019 · 1 comment
Closed

some consistent characteristics of highlight #39

Wuqiqi123 opened this issue Mar 20, 2019 · 1 comment
Assignees
Labels
☠️ provably impossible Things that are actually impossible with Textmate

Comments

@Wuqiqi123
Copy link

For a class or struct name, guarantee consistency in the whole file.
My vscode define a struct such as in a .cpp file:
image
I hope the node and MAX can have the same color in the main function.
Can I have some ways to solve this?

@jeff-hykin jeff-hykin self-assigned this Mar 20, 2019
@jeff-hykin jeff-hykin added the ☠️ provably impossible Things that are actually impossible with Textmate label Mar 20, 2019
@jeff-hykin
Copy link
Owner

Sadly, this is well beyond the capabilities of TextMate grammars :( I very much wish there was a way to do this.

The issue is there are no variables/memory inside the parser. It can only look at what is immediately nearby it, and then use that as a hint as to what the thing is. Often times it can only see one line at a time.

Something that I would like to talk to VS Code about is implementing a fully-supported C++ parser like the one used in Xcode. It would be capable of those kinds of colorings.

I'm going to close this issue, but feel free to continue the conversation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☠️ provably impossible Things that are actually impossible with Textmate
Projects
None yet
Development

No branches or pull requests

2 participants