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

chore: update scala tree-sitter grammar #7147

Merged
merged 2 commits into from
May 30, 2023
Merged

chore: update scala tree-sitter grammar #7147

merged 2 commits into from
May 30, 2023

Conversation

zetashift
Copy link
Contributor

Update to a new Scala tree-sitter grammar revision, because the current one lags behind by quite a bit:

https://github.com/tree-sitter/tree-sitter-scala/commits/master

@archseer
Copy link
Member

Is there also any highlight query changes? It's usually not enough to just bump the grammar

@the-mikedavis
Copy link
Member

It's a little hard to tell looking at the diff (compare) but it looks like all of the changes are structural or to unnamed rules so we may not need to update the highlights queries.

We could add the new locals queries though for better highlighting: https://github.com/tree-sitter/tree-sitter-scala/commits/e37d21701bd03d5bb27f5e2e8339ce6afc419784

@the-mikedavis the-mikedavis added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. A-language-support Area: Support for programming/text languages labels May 27, 2023
@zetashift
Copy link
Contributor Author

We could add the new locals queries though for better highlighting: https://github.com/tree-sitter/tree-sitter-scala/commits/e37d21701bd03d5bb27f5e2e8339ce6afc419784

What are local queries (sorry not a tree-sitter expert).

@the-mikedavis
Copy link
Member

Ah sorry, I mixed up the permalink. I think we should be able to use these out-of-the-box https://github.com/tree-sitter/tree-sitter-scala/blob/798ec789401de159e0c07ae170c8ae6dfbbfd94c/queries/scala/locals.scm

copying them to runtime/queries/scala/locals.scm. (Also see https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables)

@zetashift
Copy link
Contributor Author

Ah sorry, I mixed up the permalink. I think we should be able to use these out-of-the-box https://github.com/tree-sitter/tree-sitter-scala/blob/798ec789401de159e0c07ae170c8ae6dfbbfd94c/queries/scala/locals.scm

copying them to runtime/queries/scala/locals.scm. (Also see https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables)

Oooh, I see, thank you!

@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 29, 2023
@pascalkuthe pascalkuthe merged commit 9238054 into helix-editor:master May 30, 2023
Triton171 pushed a commit to Triton171/helix that referenced this pull request Jun 18, 2023
* chore: update scala tree-sitter grammar

* Add locals.scm for Scala
wes-adams pushed a commit to wes-adams/helix that referenced this pull request Jul 4, 2023
* chore: update scala tree-sitter grammar

* Add locals.scm for Scala
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
* chore: update scala tree-sitter grammar

* Add locals.scm for Scala
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
* chore: update scala tree-sitter grammar

* Add locals.scm for Scala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants