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

tree-sitter broken with neovim 0.10 #15

Open
cdarken opened this issue Jun 4, 2024 · 6 comments
Open

tree-sitter broken with neovim 0.10 #15

cdarken opened this issue Jun 4, 2024 · 6 comments
Labels
question Further information is requested

Comments

@cdarken
Copy link

cdarken commented Jun 4, 2024

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
Copy link
Owner

gbprod commented Jun 4, 2024

I think you should update the PHP parser.

You can do this with :TSInstall php.

@cdarken
Copy link
Author

cdarken commented Jun 4, 2024

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

@gbprod
Copy link
Owner

gbprod commented Jun 4, 2024

The string_content node was introduced in the php tree-sitter parser 1 month ago with this PR : tree-sitter/tree-sitter-php#237

Maybe you can share your config ?

@cdarken
Copy link
Author

cdarken commented Jun 4, 2024

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

@cdarken
Copy link
Author

cdarken commented Jun 4, 2024

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 gbprod added the question Further information is requested label Jun 4, 2024
@gbprod
Copy link
Owner

gbprod commented Jul 2, 2024

Do you still have this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants