Skip to content

add reasonml syntax#5

Closed
Khady wants to merge 2 commits intozed-extensions:mainfrom
Khady:patch-1
Closed

add reasonml syntax#5
Khady wants to merge 2 commits intozed-extensions:mainfrom
Khady:patch-1

Conversation

@Khady
Copy link
Copy Markdown
Contributor

@Khady Khady commented Dec 4, 2024

Initiating support for #4

@cla-bot

This comment was marked as resolved.

@Khady

This comment was marked as resolved.

@cla-bot cla-bot bot added the cla-signed label Dec 4, 2024
@cla-bot

This comment was marked as resolved.

@notpeter
Copy link
Copy Markdown
Contributor

notpeter commented Dec 4, 2024

You'll need to add language folders for reason_ml and reason_ml_interface including config.toml to associate file extensions with the grammars. Then you'll also want to include the relevant tree-sitter queries (*.scm) as well.

Look at the other languages/ folders for examples.

And Developing Zed Language Extensions in the docs for more.

@Khady
Copy link
Copy Markdown
Contributor Author

Khady commented Dec 6, 2024

Getting an error in zed's log when trying to install the extension with the additional reason grammar. But it's not obvious what is zed running to compile the grammar.

Caused by:
    failed to compile reasonml parser with clang: wasm-ld: warning: creating shared libraries, with -shared, is not yet stable
    wasm-ld: error: symbol exported via --export not found: tree_sitter_reasonml
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

@MrSubidubi
Copy link
Copy Markdown
Contributor

Hey, and sorry for the very spurious response!

The error you are seeing is because you have to use the name provided by the grammer. I believe that would be

https://github.com/reasonml-editor/tree-sitter-reason/blob/0226cfecaa2257d56d7c3f364f789cba042e403f/src/grammar.json#L2

for your case.

Are you still interested in taking a look at this? I can understand that the experience was frustrating for your. Either way, we obviously still really appreciate that you took a stab at this, and I'd love to push this over the finish line if you are still intereted.

@Khady
Copy link
Copy Markdown
Contributor Author

Khady commented Aug 25, 2025

thanks for the hint! I'll try to have a look when I have a bit of time if someone else hasn't done it before.

@MrSubidubi MrSubidubi marked this pull request as draft August 26, 2025 11:15
@notpeter
Copy link
Copy Markdown
Contributor

Closed in favor of:

@notpeter notpeter closed this Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants