vscode-ocaml-platform icon indicating copy to clipboard operation
vscode-ocaml-platform copied to clipboard

Convert between Reason syntax and OCaml syntax

Open NicholasLYang opened this issue 1 year ago • 5 comments

Is there a way to convert between the two syntax forms using this extension? Specifically I think it'd be neat to be able to write code in one syntax, then convert it back as needed.

NicholasLYang avatar Mar 27 '25 05:03 NicholasLYang

Hi @NicholasLYang, there is no way to do that from the editor plugin right now.

voodoos avatar Mar 27 '25 10:03 voodoos

How difficult do you think it would be to add? I'm happy to do it with a little guidance

NicholasLYang avatar Mar 27 '25 20:03 NicholasLYang

Who wants it?

smorimoto avatar Mar 27 '25 20:03 smorimoto

I do :p. I'm thinking it'd be a nice workflow to be able to work in existing OCaml codebases but use Reason to read/write my code

NicholasLYang avatar Mar 27 '25 22:03 NicholasLYang

It's a relatively common use case for the melange playground (which uses refmt to do that) https://melange.re/unstable/playground/?language=OCaml&code=&live=on

davesnx avatar Nov 04 '25 10:11 davesnx