Another tree-sitter based highlighter for VSCode

I'm not the author of this extension:

But I'm helping its creator to get the highlighting right for Rust:
https://github.com/EvgeniyPeshkov/syntax-highlighter/issues/3

But I'm far from knowing Rust as well as some other ppl from this forum so any inputs are welcome!

(also posted on reddit: https://www.reddit.com/r/rust/comments/bta0yn/another_treesitter_based_highlighter_for_vscode/)

Apologies of this is off topic:

Since you've clearly familiar with the TreeSitter parsing approach, can you briefly explain how TreeSitter works, how it compares to existing VSCode Rust parser, and how it compares to IntelliJ Rust parser?

I'm at times very happy and at times not so happy with IntelliJ's Rust parser. If TreeSitter makes it easier to hack on the parser itself, it'd be quite cool.

1 Like

I'm far from really knowing the subject deeply. What I know though, is that VSCode hightlighter is using TextMate grammar to describe the language to parse, and it seems to be regex based.
Tree-sitter, on the other hand, is semantic based, so I believe it parses the code and construct some kind of abstract representation of it in order to assign colours.

Anyone please feel free to correct me if I'm saying bad stuff here :slight_smile:

1 Like

Evgeniy, the author, has released a new version with many of my feedbacks, and I've created some issues to further improve the extension:

Feel free to add your remarks as well :slight_smile:

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.