-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Conversation
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.
There was a problem hiding this 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)
Since I am bumping to the current latest f6bbf35de41653b409ca9a3537a154f2b095ef64, it should contain the commits and subsequent codegen from tree-sitter/tree-sitter-scala#165. |
The highlights need to be updated in our local file: helix/runtime/queries/scala/highlights.scm Lines 112 to 114 in efeec12
|
Ah! That makes sense. Let me update the PR. |
This captures String interpolator as `function.call` Co-authored-by: Chris Kipp <[email protected]>
runtime/queries/scala/highlights.scm
Outdated
@@ -112,6 +112,9 @@ | |||
(generic_function | |||
function: (identifier) @function) | |||
|
|||
(interpolated_string_expression | |||
interpolator: (identifier) @function.call) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interpolator: (identifier) @function.call) | |
interpolator: (identifier) @function) |
We use different captures: https://docs.helix-editor.com/master/themes.html#syntax-highlighting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed f43f3b4
* 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]>
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.