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

language detection (for tree-sitter cli, etc) #12

Closed
wants to merge 2 commits into from
Closed

language detection (for tree-sitter cli, etc) #12

wants to merge 2 commits into from

Conversation

avodonosov
Copy link
Collaborator

@avodonosov avodonosov commented May 29, 2023

I have installed this parser. Using the command line interface, tree-sitter dump-languages prints:

scope: 
parser: "/home/anton/my/unpacked/tree-sitter/parsers/tree-sitter-commonlisp"
highlights: None
file_types: []
content_regex: None
injection_regex: None

As we see, it does not know any file types.

Correspondingly, when running tree-sitter tags ~/prj/cl+ssl/cl-plus-ssl/src/package.lisp it prints error:

No language found for path "/home/anton/prj/cl+ssl/cl-plus-ssl/src/package.lisp"

After applying the suggested change to package.json, the language of the file is correctly recognized.

The need for the tree-sitter section in the package.json is documented here:
https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-configuration

See also C or Ruby implementations:
https://github.com/tree-sitter/tree-sitter-c/blob/a015709e7d1bb4f823a2fc53175e0cbee96c1c3e/package.json#L30
https://github.com/tree-sitter/tree-sitter-ruby/blob/206c7077164372c596ffa8eaadb9435c28941364/package.json#L29

@avodonosov avodonosov mentioned this pull request May 29, 2023
@theHamsta
Copy link
Member

Thank you! O guess this commit was already included in the other PR.

@theHamsta theHamsta closed this Jun 4, 2023
@avodonosov
Copy link
Collaborator Author

Yes, #14 was implemented on top of this fix, so when #14 was merged first, this fix is automatically merged too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants