Reason: Layer in Spacemacs

Created on 19 Mar 2017  路  5Comments  路  Source: reasonml/reason

Would be nice if we can only add reason in the layers configuration instead of the Emacs raw configuration.

Editor support

Most helpful comment

@actionshrimp's PR is now on the Spacemacs develop branch.
Add ReasonML layer https://github.com/syl20bnr/spacemacs/pull/11963

All 5 comments

I've started on a layer, which I managed to get working with merlin and refmt as well. It's experimental but could still be useful for further experiments.

https://github.com/fredyr/reason

One point to note is that apparently a package can only be owned by one layer, which makes the reason layer dependent on ocaml, in order to use merlin.

Lastly, instead of pulling in the reason-mode locally, it's easy to change to pull it from the repo directly as shown here:
https://github.com/facebook/reason/pull/1147/files

We can ensure that the ocaml layer is enabled with configuration-layer/declare-layer.
http://spacemacs.org/doc/LAYERS.html#cross-dependencies

But be aware that the ocaml layer expects an opam installation. As long as you dont install an ocaml compiler with it, you are fine - otherwise the npm install of the ReasonProject will break spectacularly.

https://github.com/reasonml/ReasonProject#install

Note: Disable any ocaml global compilers you have in your PATH. If you already have an ocaml compiler installed via opam, disable the line in your ~/.bashrc that sources the opam environment. You may even want to uninstall any ocaml compilers that you installed via brew. (We are working on a fix to this problem).

I also created a layer, before I saw this issue. I have barely even tested it yet, but if anyone is on develop give it a try, might work for you.

https://gist.github.com/joefiorini/0204b4dd72a6722f57c84ed071f49929

I've submitted a layer to spacemacs as a PR based on @fredyr's layer with a few updates which I've been using successfully for the last few months - if anyone has any other input it'd be much appreciated.

@actionshrimp's PR is now on the Spacemacs develop branch.
Add ReasonML layer https://github.com/syl20bnr/spacemacs/pull/11963

Was this page helpful?
0 / 5 - 0 ratings