Closed nabezokodaikon closed 2 years ago
@clason discovered that there's a problem with the new tree-sitter-cli 0.20.3 that it doesn't generate parser.h. You will notice this when you use homebrew. You should be able to downgrade to tree-sitter-cli 0.20.2 to fix this problem.
excuse me. How can I change the version of tree-sitter-cli
?
I'm not on Mac but does this work. I don't know why brew install tree-sitter@0.20.2
doesn't work.
https://github.com/tree-sitter/tree-sitter/releases -> 0.20.2 and put it into your PATH before your homebrew PATH
Right now brew installs tree-sitter 0.20.3 which is the affected version. Maybe the tree-sitter team will release a hotfix
❯ brew install tree-sitter
==> Downloading https://ghcr.io/v2/homebrew/core/tree-sitter/manifests/0.20.3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/tree-sitter/blobs/sha256:b31036d325a268ec23f76ec2740c558d1ea4f4fbcf65b6336e8c3b77c06a6af0
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:b31036d325a268ec23f76ec2740c558d1ea4f4fbcf65b6336e8c3b77c06a6af0?se=2022-01-22T21%3A00%3A00Z&sig=G6ms2mVf4XqRGlxYtF1XDrCWwzE9hV5xnDqZY15h90I%3D&sp=r&spr=https&sr=b&sv=2019-12-12
######################################################################## 100.0%
==> Pouring tree-sitter--0.20.3.x86_64_linux.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /home/linuxbrew/.linuxbrew
Could not symlink bin/tree-sitter
Target /home/linuxbrew/.linuxbrew/bin/tree-sitter
already exists. You may want to remove it:
rm '/home/linuxbrew/.linuxbrew/bin/tree-sitter'
To force the link and overwrite all conflicting files:
brew link --overwrite tree-sitter
To list all files that would be deleted:
brew link --overwrite --dry-run tree-sitter
Possible conflicting files are:
/home/linuxbrew/.linuxbrew/bin/tree-sitter -> /home/linuxbrew/.linuxbrew/lib/node_modules/tree-sitter-cli/cli.js
==> Summary
🍺 /home/linuxbrew/.linuxbrew/Cellar/tree-sitter/0.20.3: 18 files, 14.3MB
==> Running `brew cleanup tree-sitter`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Warning: Use xorgproto instead of deprecated linuxbrew/xorg/xorgproto
Warning: Use xorgproto instead of deprecated linuxbrew/xorg/xorgproto
You could also try to not install the parsers that require installation from grammar. For this you can just delete the tree-sitter binary or https://github.com/theHamsta/nvim-treesitter/blob/651d7ef33c43e13e43921f49188dcd2133c154b9/README.md#L112-L113
tree-sitter 0.20.3 will be able to generate parser that are faster to load queries for.
thank you. I will try.
@clason discovered that there's a problem with the new tree-sitter-cli 0.20.3 that it doesn't generate parser.h. You will notice this when you use homebrew. You should be able to downgrade to tree-sitter-cli 0.20.2 to fix this problem.
There is not; you just have to add the --abi
flag -- that's precisely what my PR is about (which I just merged).
Max said he'll release a bugfix release next week.
(Homebrew does not allow downgrades; once a version is bumped, the old one is gone forever.)
Where should I put the --abi
option?
tree-sitter generate --abi=latest
Or update nvim-treesitter
, which should do this automatically now where necessary.
Also, why do you override the compiler on macOS? That should not be necessary.
I had another issue, so I just tried it.
excuse me. Could you give us an explanation that will be possible from the beginning?
Even if I did as I was told, it was as follows.
$ tree-sitter generate --abi=latest
No such file or directory (os error 2)
Well, yes, you actually have to tell it which grammar to generate a parser for (i.e., you have to be in a parser repo).
Really, updating nvim-treesitter should fix that issue (it did for me, unsurprisingly).
it is complete. thank you.
I am still having this issue. What was the command that people ran to fix this?
TSUpdate
Describe the bug
Occurs when treesitter is installed without treesitter installed.
To Reproduce
TSUpdate
Expected behavior
All installations complete successfully without any errors.
Output of
:checkhealth nvim-treesitter
Output of
nvim --version
Additional context
nvim-treesitter setting.