grantjenks / py-tree-sitter-languages

Binary Python wheels for all tree sitter languages.
Other
116 stars 35 forks source link

allow looking up language by filename #22

Closed tmm1 closed 11 months ago

tmm1 commented 11 months ago

fixes #21

cc @paul-gauthier @simonw

grantjenks commented 11 months ago

Should this go in py-tree-sitter instead? Seems like a simple script to generate a language file which would be generally useful. I understand it’s related here to the binaries included in the package but I’d rather not maintain it myself.

tmm1 commented 11 months ago

Yea that's a fair point. Perhaps py-tree-sitter should generate a languages_index.py alongside the languages.so, and then all you have to do is copy it over.

I'll work on an upstream PR, but if it gets stuck in limbo perhaps we can ship this and refactor later.