ReasonML language plugin for idea
Please see the wiki.
![](https://raw.githubusercontent.com/samdfonseca/reasonml-idea-plugin/master/docs/structure.png)
Other features:
- Line and block commenting
- Pair braces matcher
- Reformat using
refmt
(presscrtl alt shift R
or⌘⎇⇧R
on Mac) - Reformat on save
- Works natively on Windows
Make sure
"namespace": false
is set inbsconfig.json
to enable inferred types hints in the editor.
- Be patient
- Give this project some love, star it or star the plugin page in intellij repository
- Fill the github repo with specific issues
Support my work with liberapay
Support my work with paypal-me
To all the people who have donated, you are awesome !! Really, this is pure anonymous donation and it blows my mind... I'm very grateful and it's kinda stupid but it keeps me motivated. So big thanks.
Many thanks also to the jetbrains team who provide me an OSS licence for their product.
List of templates that may help development.
abbrevation: jsp
, description: create a jsProps in wrapReasonForJs
~$NAME$=jsProps##$NAME$,$END$
abbreviation: style
, description: create a style module
module Styles = {
open Css;
let $VAR$ = style([
$END$
]);
};
abbreviation: comp
, description: create a reason component
let component = ReasonReact.statelessComponent("$NAME$");
let make = (~$PROP$, _children) => {...component, render: _self => <div />};
$END$
/*
JS interop
expose an helper for js - can be deleted when no more used by javascript code
*/
let jsComponent =
ReasonReact.wrapReasonForJs(~component, jsProps =>
make(~$PROP$=jsProps##$PROP$, [||])
);
-
Why don't you consider using Language Server Protocol ?
Mainly because I want a strong integration in the IDE and I need a first class support of Windows.
-
What versions does the plugin support at the moment?
It should work with idea 15
-
How is it different than ocaml language plugin?
I wanted to have a plugin dedicated to reason and that's why I created one called reasonml, not ocaml. Then I realised that I still need ocaml support and that people are asking for it.
I started this plugin by studying and copying parts of the ocaml plugin, but now the 2 projects are taking different orientations, technically.
I am moving away from merlin and trying to use the most of Intellij structures.
Now, they have incompatible implementations, and different goals.
-
Modules from
node_modules
folder are not resolved (GoTo is not working onArray.sort
)?Ensure that
node_modules
folder is not excluded from IDE index.
This project is heavily inspired by :
- custom language tutorial from intellij
- ocaml language plugin from sidharthkuruvila ( 👍 )