@Eli Dowling the Zed Extensions CI gives following error:
image.png
https://github.com/zed-industries/extensions/actions/runs/8860237363/job/24335434614
Okay, so that's going to be because just like helix and neovim zed supports it's own specific selection of tree sitter queries. The default ones inside the tree-sitter-roc repo are from Helix and I imagine zed probably matches that closely but we'll have to either find documentation for the queries that z supports or just go by trial and error removing the ones that don't work for now
I'd love to help you but unfortunately zed it's completely borked on Linux for me :(
We could try to run their CI scripts inside of the your tree sitter or the my zed-roc repo, so we would at least get the errors step by step.
You get the errors when you load the plugin in zed if you run zed from the CLI
I was able to get that far on my Linux setup
I was able to get that far on my Linux setup test
@Eli Dowling: I have build the zed extension cli tool locally on my ARM Mac, they are using the tool in the CI Build. It’s included as create in the main zed.git, but only published for x86 Linux. I’ll try to detect the problematic queries and mark these, bc. I have no clue about tree sitter and queries atm. :)
Commenting out the following lines got it "working" for me on arm mac.
# highlights.scm
(backpassing_expr assignee: (identifier_pattern (identifier) @parameter.definition))
;----function invocations ----
(function_call_expr
caller: (variable_expr
(identifier)@function))
(function_call_expr
caller: (field_access_expr (identifier)@function .))
; pattern captures
(when_is_branch pattern: (_ (identifier_pattern (identifier) @variable.parameter)))
# indents.scm
;;It's annoying when pipelines automatically dedent this pervents that
(expr_body
result: (bin_op_expr)
)@extend
;this automatically dedents, this may be more annying than helpful when writing pipelines
(expr_body
result: (_)
) @extend.prevent-once
# injections.scm
;injection from piping function calls
(bin_op_expr
part: (const
[(multiline_string)(string)] @injection.content)
part: (operator)
part: (variable_expr
(identifier)@injection.language))
Logs all displayed the error message of Impossible pattern
# example
Error loading highlights query
Caused by:
Query error at 143:19. Impossible pattern:
(backpassing_expr assignee: (identifier_pattern (identifier) @parameter.definition))
Lovely! I'll look into this when I get some time :)
Okay I think this is now a fixed issue I updated my version of zed and it's working fine. It seems like at some point zed didn't support part of the query syntax and now it does. Using @Alf Richter's extension worked well for me
Thank you both! Seems to be working for me too. Pulled down the latest changes and I don't see any errors in the Zed log when rebuilding.
I've triggered a new build of my PR
https://github.com/zed-industries/extensions/pull/432
If this CI/CD run is successful, then the roc extension should be installable as normal zed plugin.
yeah I forgot to mention, this has been working well for me too!
Last updated: Jul 06 2025 at 12:14 UTC