Skip to content

Using tree-sitter-highlight library from upstream #156

Description

@jspawar

Hello, new to a lot of this, so apologies in advance for any misunderstandings of course. Was poking around and from what I appear to see is that the highlighting provided by this module seems to be done a bit "manually" by something like querying the tree-sitter "tree" for a buffer and using that to highlight?

Was curious then why tree-sitter-highlight wasn't used instead? (Assuming it wasn't used because it's not in the Cargo.toml)

I also tried toying around with that upstream library and seems plenty sufficient (so far as I understand it is what's actually intended to back highlighting in the bigger consumers of tree-sitter such as Atom or GitHub itself). Gave it some input files and it correctly provided region ranges along with the correct type of node/token.

Wonder if it could also mitigate some issues folks are having such as #94 and #76? The output I received was able to correctly identify local variables, so seems like it should?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionNot a bug report or feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions