-
Notifications
You must be signed in to change notification settings - Fork 8
Special-case _unused and __MODULE__ #19
Comments
Thanks for starting the work on integrating with nvim-treesitter. I As for the implementation status, there are two unsolved issues
Could this be solved by
I played around with these and removing queries on identifier seems to so we are basically asking whether it's OK to specialize the AST (like Initially, I tried to avoid this direction, but I don't see any other Apart from these, I am still not clear how the queries will be |
I started looking into this, but I'm not sure if the current implementation would help. I don't think you can "scope"
This will match all identifiers nested under
Yeah, this is sadly what I'm asking/proposing. I can understand why you wanted to avoid doing this, but (with my very limited understanding) I think this is the only way to work around the current "limitations" of tree-sitter …
nvim-treesitter locks parsers to a certain commit. So it will not (by default at least) install a newer version of the parser automatically. This way the queries could be updated to match the new AST before pulling in a newer version of the parser. |
Introducing something like the I am still unsure how to handle pattern in function argument position, even |
I played around with the
Which obviously doesn't work for a variety of reasons:
I also tried At the moment I don't have any good ideas on how to make this work … |
I'm working on integrating this awesome parser into nvim-treesitter. While working on the queries, I too ran into #4.
At least for me, the issue is caused by the following queries (that I wrote):
Would it be a good idea to add two new identifier types (e.g.
unused_identifier
andspecial_identifier
) to handle these cases?(I tried adding support for this myself and submitting a PR, but I'm afraid I don't know enough about writing tree-sitter gammars yet …)
The text was updated successfully, but these errors were encountered: