tree-sitter / tree-sitter-typescript

TypeScript grammar for tree-sitter
MIT License
342 stars 104 forks source link

Rust crate seems to only highlight type annotations #176

Closed LaylBongers closed 2 years ago

LaylBongers commented 2 years ago

I am trying to highlight TypeScript code in an editor I'm working on in Rust, but using the Rust crate associated with this repository seems to only highlight type annotations, rather than everything part of TypeScript:

the-machinery_3IJfwzg4lK

I'm using the standard tree-sitter-highlight API for this, is there something I'm doing wrong with this?

let config = HighlightConfiguration::new(
    tree_sitter_typescript::language_typescript(),
    tree_sitter_typescript::HIGHLIGHT_QUERY,
    "",
    tree_sitter_typescript::LOCALS_QUERY,
).unwrap();
mjambon commented 2 years ago

We can't help with that here. This repo is only for the typescript grammar. If you think this is a parsing bug, please follow the instructions in the issue template. Otherwise maybe try https://github.com/tree-sitter/tree-sitter/issues