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

Cannot find DLL: (libtree-sitter-python libtree-sitter-python.dll) No such file or directory #545

Closed
vjohansen opened this issue Apr 19, 2024 · 4 comments

Comments

@vjohansen
Copy link

GNU Emacs 29.2 (build 2, x86_64-w64-mingw32) of 2024-02-01

When I call python-ts-mode in a py-file it fails with

■  Warning (treesit): Cannot activate tree-sitter, because language grammar for python is unavailable (not-found): (libtree-sitter-python libtree-sitter-python.dll) No such file or directory

Steps

  • Install tree-sitter-langs-0.12.175 via Emacs package manger (ths gives me ~\emacs-29.emacs.d\elpa\tree-sitter-langs-0.12.175\bin\python.dll )
  • restart emacs via runemacs -q
  • open py file
  • call python-ts-mode

Result: it looks for libtree-sitter-python.dll

python-ts-mode calls (treesit-ready-p 'python) which throws an error because (treesit-language-available-p lang t) fails

treesit-language-available-p is a C function

@jcs090218
Copy link
Member

This is tree-sitter.el and not the built-in treesit.el. 🤔 I think you are looking for https://github.com/renzmann/treesit-auto.

@vjohansen
Copy link
Author

Thanks. I tried it but could not get it working. Will try again.

Maybe add some info on your frontpage/READ about this

I am trying to upgrade to Emacs 29 (windows) and find it difficult to understand treesit support

@vjohansen
Copy link
Author

treesit-auto tries to compile with cc on windows so that does not work and a substitute for a package precompiled DLLs

  Warning (treesit): Error encountered when installing language grammar: (file-missing Searching for program No such file or directory cc)

@jcs090218
Copy link
Member

tree-sitter.el is not the same as treesit.el. You should open a bug report on their repo!

Maybe add some info on your frontpage/READ about this

I agree. This can be quite confusing for people who are new to Emacs.

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

No branches or pull requests

2 participants