- If you want to target the browser and use ReScript syntax you can directly use https://github.com/rescript-lang/rescript-vscode and have similar support.
- If you do Reason these days (at the time I'm writting, arround September 2021) is commonly to target native development and you will use OCaml 4.12. In that case: follow the https://github.com/ocaml/ocaml-lsp installation.
but I find very useful, I keep liking more the Reason syntax and the ocaml-lsp experience it's much better than the rescript extension. Notably with the CodeLens support https://code.visualstudio.com/blogs/2017/02/12/code-lens-roundup with https://github.com/ocaml/ocaml-lsp.
So, If you want to keep using Reason syntax targeting the browser/node and have a good editor support, follow this:
$ esy --version
0.6.11
$ cat esy.json
{
"dependencies": {
"@opam/ocaml-lsp-server": "1.4.1",
"@opam/dune": "2.5.1",
"@opam/ocamlfind-secondary": "1.8.1",
"@opam/reason": "3.6.0",
"ocaml": "4.6.x"
}
}
# Install them
$ esy
https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform
CMD + P > "OCaml: Select a Sandbox for this Workspace" > Choose "Esy"
Hope it helps, if you find any issue please go to the Discord: https://discord.gg/T6YxT5JCWX