georgewfraser/vscode-tree-sitter

[Bug][Rust] Type, functions, enum

Geobert opened this issue · 3 comments

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

  • ServerError is a type and not highlighted
  • ServerError::new, new is a function and not highlighted
  • Err and Ok are enum variant of std::result::Result, I don't know if they're supposed to be hightlighted, just pointing a difference here
  • get_user_id, user_sessions_key and transaction are functions and not hightlighted

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

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: microsoft/vscode#32813 (comment)

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.

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

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)