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

Implement tree-sitter context queries. #104

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

hugopl
Copy link
Collaborator

@hugopl hugopl commented Jan 14, 2025

then: (then) @context.end
) @context

(case
Copy link
Member

Choose a reason for hiding this comment

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

Also select

queries/nvim/context.scm Show resolved Hide resolved
@keidax
Copy link
Collaborator

keidax commented Jan 14, 2025

I see the plugin has a custom test format, maybe that only makes sense to add when this is ready to contribute upstream?

queries/nvim/context.scm Show resolved Hide resolved
queries/nvim/context.scm Show resolved Hide resolved
@hugopl
Copy link
Collaborator Author

hugopl commented Jan 15, 2025

I see the plugin has a custom test format, maybe that only makes sense to add when this is ready to contribute upstream?

It makes sense to add them here too, I just don't have time to write them now. So I manually tested the rules in vim like a cave man.

@hugopl
Copy link
Collaborator Author

hugopl commented Jan 16, 2025

Just saw the test format... I'll add it here, or maybe I try to submit a PR to nvim-context itself, however I'm not sure it they will accept since this isn't on nvim-treesitter yet.

@hugopl
Copy link
Collaborator Author

hugopl commented Jan 20, 2025

I wrote a test, I tried to run it on nvim-treesitter-context but it needs the language to be already in nvim-treesitter to execute the tests.

So I think the tests can be sent when this query get upstream and this can be merged now.

@nobodywasishere
Copy link
Member

If you add select I'll approve / merge

@hugopl
Copy link
Collaborator Author

hugopl commented Jan 24, 2025

Oops I had forgot about it, I'll add maybe tomorrow then ping you.

@hugopl
Copy link
Collaborator Author

hugopl commented Jan 24, 2025

select added.
image

@nobodywasishere nobodywasishere merged commit aa49bf2 into crystal-lang-tools:main Jan 24, 2025
3 checks passed
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.

4 participants