georgewfraser / vscode-tree-sitter

Accurate syntax coloring for VSCode using tree-sitter
MIT License
175 stars 25 forks source link

[Bug][Rust] Type, functions, enum #7

Open Geobert opened 5 years ago

Geobert commented 5 years ago

First, thanks for figuring out the Windows/Linux issue! Many little things to adjust:

And a question: The colors seems hardcoded, can you try to retrieve the colors from the current theme? (I know we can customize them in the meantime :) )

No tree-sitter image

Tree-sitter image

georgewfraser commented 5 years ago

It would be great if you would tackle this---there's a guide in the README.md for how to contribute, and I've tried to outline a "colorization philosophy" here.

The colors seems hardcoded, can you try to retrieve the colors from the current theme?

At the moment it is not possible to use TextMate scope colors programatically: https://github.com/microsoft/vscode/issues/32813#issuecomment-488572556

If VSCode adds a way to use TextMate scope colors in setDecorations, then we will switch to that and eliminate the treeSitter.field/function/type colors from package.json. In the meantime, the only solution is for the color themes to add treeSitter.field/function/type.

georgewfraser commented 5 years ago

BTW the tree-sitter playground is very helpful for understanding the syntax tree that we are using for colorization: https://tree-sitter.github.io/tree-sitter/playground

Geobert commented 5 years ago

It would be great if you would tackle this

No promise, I'm missing time on my own projects already (life, life…) and don't know a thing about JS nor Typescript (JVM and native programmer here)