gbprod / php-enhanced-treesitter.nvim

Improve default php treesitter grammar using grammar injections
Do What The F*ck You Want To Public License
6 stars 4 forks source link

tree-sitter broken with neovim 0.10 #15

Open cdarken opened 5 months ago

cdarken commented 5 months ago

This is the output in :checkhealth:

- ERROR php(injections): /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 49:2. Invalid node type "string_content":
  (string_content) @injection.content
   ^

  php(injections) is concatenated from the following files:
  |    [OK]:"/home/cata/.local/share/lazy/lazy/nvim-treesitter/queries/php/injections.scm"
  | [ERROR]:"/home/cata/.local/share/lazy/lazy/php-enhanced-treesitter.nvim/queries/php/injections.scm", failed to load: /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 3:2. Invalid node type "string_content":
  (string_content) @injection.content
   ^

I'm not sure how to fix this.

gbprod commented 5 months ago

I think you should update the PHP parser.

You can do this with :TSInstall php.

cdarken commented 5 months ago

I already did this, countless times. Even if I remove the ~/.local/share/lazy dir and reinstall everything, the error still occurs.

gbprod commented 5 months ago

The string_content node was introduced in the php tree-sitter parser 1 month ago with this PR : https://github.com/tree-sitter/tree-sitter-php/pull/237

Maybe you can share your config ?

cdarken commented 5 months ago

I will try to reproduce it using a fresh clone of kickstart.nvim.

cdarken commented 5 months ago

Ok, I think I found something. The error occurs if I set the highlight = { ... } entry in the table given as argument to require'nvim-treesitter.configs'.setup() function. Edit: but I think it's in combination with something else, because in the kickstart.nvim config it's fine.

gbprod commented 4 months ago

Do you still have this issue ?