Skip to content

How to get typescript/tsx/jsx highlighting working? #2180

Closed Answered by tonijarjour
tonijarjour asked this question in Q&A
Discussion options

You must be logged in to vote

I got it you have to concat the highlight queries like this:

    HighlightConfiguration::new(
        tree_sitter_typescript::language_typescript(),
        &format!(
            "{}\n{}",
            tree_sitter_javascript::HIGHLIGHT_QUERY,
            tree_sitter_typescript::HIGHLIGHT_QUERY
        ),
        "",
        tree_sitter_typescript::LOCALS_QUERY,
    )
    .unwrap()

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tonijarjour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant