atom-ocaml / ocaml-merlin

Linting and autocompletion for Ocaml in Atom
MIT License
24 stars 3 forks source link

ocaml-merlin

Use ocamlmerlin to autocomplete, lint, refactor and navigate your OCaml/Reason code in Atom.

Note: Although this package is still working, ide-reason provides better OCaml support.

Features

Usage

Linting is performed on save or while typing by linter. Autocompletion is performed on the fly by autocomplete-plus.

No default keybindings are provided, except those compatible with the symbols-view package. Additional keybindings can be set in your keymap.

Command Description Keybinding (Linux, Windows) Keybinding (OS X)
ocaml-merlin:toggle-type Toggle type of expression under cursor
ocaml-merlin:shrink-type Shrink the expression
ocaml-merlin:expand-type Expand the expression
ocaml-merlin:destruct Destruct expression under cursor
ocaml-merlin:next-occurrence Find next occurrence of expression
ocaml-merlin:previous-occurrence Find previous occurrence of expression
ocaml-merlin:go-to-declaration Go to declaration of expression ctrl-alt-down cmd-alt-down
ocaml-merlin:go-to-type-declaration Go to type declaration of expression
ocaml-merlin:return-from-declaration Go back to expression ctrl-alt-up cmd-alt-up
ocaml-merlin:shrink-selection Shrink the current selection
ocaml-merlin:expand-selection Expand the current selection
ocaml-merlin:rename-variable Rename all occurrences of variable

Installation

This package requires language-ocaml, linter and ocamlmerlin. For auto-indenting destructed patterns, ocaml-indent is needed. For Reason support, language-reason is needed, and reason-refmt is recommended.

apm install language-ocaml linter ocaml-indent
opam install merlin