GithubHelp home page GithubHelp logo

longde123 / reasonml-idea-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from giraud/reasonml-idea-plugin

0.0 2.0 0.0 3.54 MB

ReasonML language plugin for idea

License: MIT License

Java 95.65% HTML 0.02% Lex 2.00% OCaml 2.33% C++ 0.01%

reasonml-idea-plugin's Introduction

reasonml-idea-plugin

ReasonML language plugin for idea

screenshot

Documentation

Please see the wiki.

Features

Reason syntax
Ocaml syntax
Dune syntax (limited support)
Structured view
Code folding
js language injection
Bucklescript compiler integration
JSX syntax & completion
Type annotation
Intentions (_ReasonML_): add braces to function, transform local open

Other features:

  • Line and block commenting
  • Pair braces matcher
  • Reformat using refmt (press crtl alt shift R or ⌘⎇⇧R on Mac)
  • Reformat on save
  • Works natively on Windows

Make sure "namespace": false is set in bsconfig.json to enable inferred types hints in the editor.

How to help

  • Be patient
  • Give this project some love, star it or star the plugin page in intellij repository
  • Fill the github repo with specific issues
  • Donate using Liberapay Support my work with liberapay
  • Donate using paypal Support my work with paypal-me

Some live templates

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$, [||])
  );

What?

  • 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.

Development

This project is heavily inspired by :

reasonml-idea-plugin's People

Contributors

giraud avatar lexaurin avatar okonet avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.