Skip to content

Conversation

@natsukagami
Copy link
Contributor

Improves compatibility with non-nvim tree-sitter implementations.
Since we only have very simple patterns, just switching to match should be fine.

@susliko
Copy link
Collaborator

susliko commented Jun 30, 2023

Hi!
This looks relatable to the discussion in
#286

@natsukagami
Copy link
Contributor Author

natsukagami commented Jun 30, 2023

Thanks for pointing me there. I think for these queries they don't really need to be lua-match, and using match allows both the WAsm and Rust implementations to handle the predicates.
I'm using kakoune myself, with https://github.com/phaazon/kak-tree-sitter as the tree-sitter integration.

@natsukagami natsukagami marked this pull request as ready for review June 30, 2023 13:22
@natsukagami
Copy link
Contributor Author

Failing test doesn't seem right:

 class C:
 // ^keyword
   fooooo.map: x =>
   // ^type
   //     ^method.call
     x + 1

This used to pass due to lua-match predicate not being run with tree-sitter command.

I changed the test to

 class C:
 // ^keyword
 //    ^type
   fooooo.map: x =>
   //     ^method.call
     x + 1

Old test used to pass due to `lua-match` predicates not being run with `tree-sitter` command
Copy link
Collaborator

@susliko susliko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

@susliko susliko merged commit 263ce72 into tree-sitter:master Jun 30, 2023
@natsukagami natsukagami deleted the use-match branch June 30, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants