nvim-treesitter / playground

Treesitter playground integrated into Neovim
Apache License 2.0
896 stars 47 forks source link

Playground not working #30

Closed darhsn closed 3 years ago

darhsn commented 3 years ago

I have tried several languages, nvim-treesitter works but when I do :TSPlaygroundToggle the tree is always empty, for example, I have this javascript code:

function Hello() {
    this.hello = () => console.log("Hello!");
    this.howdy = () => console.log("Howdy!");
}

the tree is empty (but with the code there is nothing wrong, when I try to run it works) so every time that I refresh the tree, there is always this error:

E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/treesitter/language.lua:33: ABI version mismatch for /home/dario/.config/nv
im/plugged/nvim-treesitter/parser/javascript.so: supported between 9 and 12, found 13 

I don't have any particular configuration for nvim-treesitter, I just followed the nvim-treesitter guide.

steelsojka commented 3 years ago

Update your neovim to the latest nightly and update nvim-treesitter to the latest. Then reinstall the parsers with :TSUpdate. There was a breaking change recently in tree-sitter that requires all parsers to be updated.

darhsn commented 3 years ago

I already have re-compiled neovim to the latest version and when I do :TSUpdate it says All parsers are up-to-date, if you want more info I have neovim NVIM v0.5.0-dev+1166-g070e084a6

steelsojka commented 3 years ago

Have you updated nvim-treesitter? Can you share the versions you are on for the plugins (nvim-treesitter and playground).

darhsn commented 3 years ago

tree-sitter version is tree-sitter 0.19.3 and I updated all the plugins right now so I have the latest version of nvim-treesitter and latest version of treesitter playground.

steelsojka commented 3 years ago

Can you share the versions that you have? Also, are you using tree-sitter bundled with neovim?

EDIT: I should also ask how you install neovim... build from source, nightly build, or package manager?

darhsn commented 3 years ago

If you tell me how to get the version i'm going to do that, yes, I use tree-sitter bundled with neovim and I installed neovim with yay -S neovim-nightly-git so I build from source with yay

darhsn commented 3 years ago

So I figured out that my neovim was 0.5+ but was not the latest version, so once I updated everything worked properly (if you are in arch yay -S neovim-nightly-git is wrong and outdated just use yay -s neovim-git).

brycepg commented 1 year ago

I had the issue of playground showing up blank until I switched from a manual install of lua-language-server to installing is via mason with :LspInstall lua-language server. I also switched from fedora neovim to bob-nvim