-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language detection #21
Comments
there's some logic in the tree-sitter cli that does this, but unfortunately its not part of the actual library i guess most people are using linguist or integrating into editor environments where they already have textmate compatible language detection. seems like it may be beneficial to port and bundle the detection code in this python package, so users don't have to reimplement it. wdyt? here's the reference impl: cc @nathansobo do i have this right? |
I’m open to a PR but unlikely to do it myself. |
👋 first off, huge thanks for putting this package together!
i'm wondering, with all these languages available what is the recommended way to pick a parser/language for a given file?
i see that each language implementation has a package.json section for tree-sitter configuration:
https://github.com/tree-sitter/tree-sitter-python/blob/master/package.json#L28-L32
latex-lsp/tree-sitter-latex#19
perhaps the build process could pluck out these entries and make them available? so then a user could simply apply the
file_types
andcontent_regex
rules to figure out what language to use.The text was updated successfully, but these errors were encountered: