-
Notifications
You must be signed in to change notification settings - Fork 15
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
Comments highlighting / parsing #31
Comments
I can't reproduce this in Helix so I think this may be an issue with the nvim-treesitter queries or the version of the parser it is using. That error comes from this line in the queries: once I think that adding extra space at the beginning is not a robust fix though - I suspect that the same problem would happen if you had comments after code like |
The problem is clearly with nvim-treetsitter or i would think so ; I tried to use helix queries or even the one provided here, elixir code is simply not highlighted anymore. I am gonna dig more and get more informations. Thank you for you input. Paul-H |
To me it is, the colorisation has various problem but nvim-treesitter uses its own set of queries and even some that are not here so... To be honest i don't know how to approach this right now and every attempts i have made have been unsuccessful. |
The difference between Each editor that uses tree-sitter defines its own set of captures and highlighting logic. Given this is not reproducible in Helix, I think this is an issue specific to nvim-treesitter and not with tree-sitter-heex itself. @paulhenri I suggest opening an issue in nvim-treesitter as that is likely where the fix will have to be made. |
As an aside, is it worth it to move to Helix for Phoenix development? Thanks. |
I can't reproduce those highlighting bugs in Helix @SichangHe. I think that neovim might be behind on the version of this parser or there might be something odd happening with the injection queries. I'm definitely biased since I work on Helix but I think it's a nice choice for working in an Elixir and/or Phoenix codebase. I believe it should be possible to highlight these snippets correctly in nvim too though. |
Hi,
The following issue occurs with neovim, i can't speak for other editors.
We have issues when using this form of comments
<% # Some comment %>
instead of this form<%# Some comment %>
If we pass on the comment line every following lines are seens as a comment (See picture below)
We tried to tweak to the parser to handle this case by changing the _hash_comment function like so :
Parsing tests do work fine with this function, even with changed cases to reflect the change but highlights one do not :
We are willing to make a Pull request to change this behavior once it works we are just looking for some hints or direction to solve the problem.
The text was updated successfully, but these errors were encountered: