Skip to content
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

bug: missing highlights.scm #7

Open
1 of 2 tasks
viperML opened this issue Aug 20, 2024 · 1 comment
Open
1 of 2 tasks

bug: missing highlights.scm #7

viperML opened this issue Aug 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@viperML
Copy link

viperML commented Aug 20, 2024

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

All the highlights.scm files don't exist, I guess they were moved:

"tree-sitter": [
{
"scope": "source.csv",
"file-types": [
"csv"
],
"path": "csv",
"highlights": [
"queries/highlights.scm"
],
"injection-regex": "csv"
},
{
"scope": "source.psv",
"file-types": [
"psv"
],
"path": "psv",
"highlights": [
"queries/highlights.scm"
],
"injection-regex": "psv"
},
{
"scope": "source.tsv",
"file-types": [
"tsv"
],
"path": "tsv",
"highlights": [
"queries/highlights.scm"
],
"injection-regex": "tsv"
}
]

Steps To Reproduce/Bad Parse Tree

Expected Behavior/Parse Tree

Repro

No response

@viperML viperML added the bug Something isn't working label Aug 20, 2024
@viperML
Copy link
Author

viperML commented Aug 21, 2024

According to the documentation, path is used to prefix where to look for src, but it is not used to prefix the queries.

As an example, the typescript grammar has a path but the queries use a path relative to the repository root, not relative to path: https://github.com/tree-sitter/tree-sitter-typescript/blob/198d03553f43a45b92ac5d0ee167db3fec6a6fd6/package.json#L91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant