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

highlight(scala): update to fix potential crash #5576

Merged
merged 3 commits into from
Jan 19, 2023

Conversation

eed3si9n
Copy link
Contributor

Ref tree-sitter/tree-sitter-scala#164

tree-sitter-scala has recently add a fix to workaround segv crashes in other editors. Not sure if it happens to Helix as well, but it's probably a good idea to use the latest.

tree-sitter-scala has recently add a fix to workaround segv crashes in other editors.
Not sure if it happens to Helix as well, but it's probably a good idea to use the latest.
Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

It would be good to port this change from the highlights too since we're updating: tree-sitter/tree-sitter-scala@71b408e#diff-d485a982e458ef8da2cc203585065b7542665cb80b78d230b1e8f77ea25825d4R96-R97

(The capture would be @function instead of @function.call since our captures are a little different from the ones used in that repo)

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

It would be good to port this change from the highlights too since we're updating: tree-sitter/tree-sitter-scala@71b408e#diff-d485a982e458ef8da2cc203585065b7542665cb80b78d230b1e8f77ea25825d4R96-R97

Since I am bumping to the current latest f6bbf35de41653b409ca9a3537a154f2b095ef64, it should contain the commits and subsequent codegen from tree-sitter/tree-sitter-scala#165.

@archseer
Copy link
Member

archseer commented Jan 19, 2023

The highlights need to be updated in our local file:

(generic_function
function: (identifier) @function)

@eed3si9n
Copy link
Contributor Author

The highlights need to be updated in our local file:

(generic_function
function: (identifier) @function)

Ah! That makes sense. Let me update the PR.

This captures String interpolator as `function.call`

Co-authored-by: Chris Kipp <[email protected]>
@@ -112,6 +112,9 @@
(generic_function
function: (identifier) @function)

(interpolated_string_expression
interpolator: (identifier) @function.call)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
interpolator: (identifier) @function.call)
interpolator: (identifier) @function)

We use different captures: https://docs.helix-editor.com/master/themes.html#syntax-highlighting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed f43f3b4

@the-mikedavis the-mikedavis merged commit 4535d0f into helix-editor:master Jan 19, 2023
@eed3si9n eed3si9n deleted the wip/scala_bump branch January 19, 2023 17:26
kirawi pushed a commit to kirawi/helix that referenced this pull request Jan 25, 2023
* highlight(scala): update to fix crash

tree-sitter-scala has recently add a fix to workaround segv crashes in other editors.
Not sure if it happens to Helix as well, but it's probably a good idea to use the latest.

* highlight(scala): String interpolator support

This captures String interpolator as `function`

Co-authored-by: Chris Kipp <[email protected]>
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-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants