nvim-treesitter / playground

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

Query editor not working? #88

Open joshfrench opened 2 years ago

joshfrench commented 2 years ago

The query editor doesn't seem to highlight anything:

Screen Shot 2022-08-22 at 18 06 31

I did see this other issue, which suggested making sure the query grammar is installed, but I've already done that. Any other ideas?

Thanks!

theHamsta commented 2 years ago

Hi! It works for me... Can you execute :echo &ft on the query buffer?

joshfrench commented 2 years ago

filetype is query

max397574 commented 2 years ago

make sure that you have the query parser installed @joshfrench

ashish10alex commented 2 years ago

I am having this same issue. I have the query parser installed too.

CleanShot 2022-11-07 at 10 58 56@2x
antonok-edm commented 1 year ago

Same issue here too. query parser is installed; ft is query. Is there any other information that would be helpful for diagnosing the issue?

antonok-edm commented 1 year ago

Much like https://github.com/nvim-treesitter/playground/issues/51#issuecomment-915715794, the issue just magically resolved itself for me as well. I did poke some related config slightly, but I wasn't specifcally attempting to fix the issue.

In particular:

TL;DR

I think PackerInstall/PackerCompile happened to fix it, but I'd definitely done those commands previously with no luck. That, plus the number of others with this issue, makes me believe there is something else going on behind the scenes.

The general syntax highlighting (outside of playground) issue I saw might be related? If you're still struggling with this issue I definitely recommend setting highlight = { enable = true } in your config, as it'll be immediately obvious if that starts working. Without the syntax highlighting change I'm not sure I would have noticed that the playground started working.

teto commented 1 year ago

I just spent 30mn trying to understand why this didn't work when the solution was as simple as installing the "query" grammar: let's add it to requirements https://github.com/nvim-treesitter/playground#requirements . I've fixed the nix package so that installing playground installs the "query" grammar as well.

timtro commented 1 year ago

I use Packer. Removing ~/.local/share/nvim/site/pack/packer/start/playground, reinstalling and recompiling fixed it for me.

teto commented 1 year ago

also note that in neovim master's you can now do :lua vim.treesitter.show_tree()