Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Alain
Alain

Posted on

     

Editor Support for ReasonML in VSCode with Melange

I have been trying for a long while now to work with ReasonML files in VSCode and get some syntax highlighting. This has been a problem sinceReasonML on the frontend has moved on toRescript. The solution would be usingMelange but I could not get the editor highlighting to work. I have a bunch of old ReasonML projects that I still refer to so losing the editor support has been less than ideal. The code still works but you are stuck relying on the terminal output for errors.

I finally got it to work with the help of@zecklar on the ReasonML Discord forum.

Here is the solution that works.

  1. Install OCaml pluginhttps://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform
  2. Build your project esy build
  3. Launch VSCode in your esy dev environmentesy code .
  4. On the lefthand side, click OCaml extension icon
  5. Click "Select sandbox"
  6. Select "Custom" from the dropdown
  7. Pass the flag, the input box should contain $prog $args --fallback-read-dot-merlin
  8. Voila, at least typehints/navigation etc seem to work

You can try it with thisrepo.

This isnt working for rescript yet but I will update you if I figure it out.

Many thank, @zecklar.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Joined

More fromAlain

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp