lang/ocaml: update README
Signed-off-by: Edwin Török <edwin@etorok.net>
This commit is contained in:
parent
a4a42d3141
commit
a1ca5b2850
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
This module adds [[https://ocaml.org/][OCaml]] support, powered by [[https://github.com/ocaml/tuareg][tuareg-mode]].
|
This module adds [[https://ocaml.org/][OCaml]] support, powered by [[https://github.com/ocaml/tuareg][tuareg-mode]].
|
||||||
|
|
||||||
+ Code completion, look up documentation, and code navigation ([[https://github.com/ocaml/merlin/wiki/emacs-from-scratch][merlin]])
|
+ Code completion, documentation look-up, code navigation and refactoring ([[https://github.com/ocaml/merlin/wiki/emacs-from-scratch][merlin]])
|
||||||
|
+ Type, documentation and function argument display on idle ([[https://github.com/Khady/merlin-eldoc][merlin-eldoc]])
|
||||||
+ REPL ([[https://github.com/ocaml-community/utop][utop]])
|
+ REPL ([[https://github.com/ocaml-community/utop][utop]])
|
||||||
+ Syntax-checking (~merlin~ with [[https://github.com/flycheck/flycheck-ocaml][flycheck-ocaml]])
|
+ Syntax-checking (~merlin~ with [[https://github.com/flycheck/flycheck-ocaml][flycheck-ocaml]])
|
||||||
+ Auto-indentation ([[https://github.com/OCamlPro/ocp-indent][ocp-indent]])
|
+ Auto-indentation ([[https://github.com/OCamlPro/ocp-indent][ocp-indent]])
|
||||||
|
@ -52,23 +53,30 @@ opam install merlin utop ocp-indent dune ocamlformat
|
||||||
+ when =:feature syntax-checker= is enabled then =flycheck-ocaml= is activated
|
+ when =:feature syntax-checker= is enabled then =flycheck-ocaml= is activated
|
||||||
to do on-the-fly syntax/type checking via =merlin=, otherwise this is only
|
to do on-the-fly syntax/type checking via =merlin=, otherwise this is only
|
||||||
done when the file is saved.
|
done when the file is saved.
|
||||||
+ spell checking is activated in comments if =:feature spellcheck= is actived
|
+ spell checking is activated in comments if =:feature spellcheck= is active
|
||||||
+ a REPL is provided if =utop= is installed and =:feature eval= is actived
|
+ a REPL is provided if =utop= is installed and =:feature eval= is active
|
||||||
+ if =:editor format= is enabled, the =ocamlformat= executable is available and
|
+ if =:editor format= is enabled, the =ocamlformat= executable is available and
|
||||||
there is an =.ocamlformat= file present then =format-all-buffer= is bound to
|
there is an =.ocamlformat= file present then =format-all-buffer= is bound to
|
||||||
=ocamlformat=, otherwise to =ocp-indent=
|
=ocamlformat=, otherwise to =ocp-indent=
|
||||||
|
+ if =:editor multiple-cursors= is enabled then identifiers can be refactored
|
||||||
|
with =v R= and multiple cursors (this correctly matches identifier occurrences
|
||||||
|
according to scope, it is not purely a textual match)
|
||||||
|
+ if =:emacs imenu= is enabled then top level symbols (modules, type, functions, etc.) can
|
||||||
|
be looked up using =SPC / i=
|
||||||
|
|
||||||
Run =make install= to install all packages, and =make doctor= to diagnose missing tools.
|
Run =make install= to install all packages, and =make doctor= to diagnose missing tools.
|
||||||
|
|
||||||
* Appendix
|
* Appendix
|
||||||
** Commands
|
** Commands
|
||||||
| command | key / ex command | description |
|
| command | key / ex command | description |
|
||||||
|------------------------------+------------------+------------------------------------|
|
|------------------------------+------------------+-----------------------------------------------------------|
|
||||||
| =merlin-type-enclosing= | =SPC m t= | display type under point |
|
| =merlin-type-enclosing= | =SPC m t= | display type under point |
|
||||||
| =tuareg-find-alternate-file= | =SPC m a= | switch between =.ml= and =.mli= |
|
| =tuareg-find-alternate-file= | =SPC m a= | switch between =.ml= and =.mli= |
|
||||||
| =merlin-locate= | =gd= | lookup definition |
|
| =merlin-locate= | =gd= | lookup definition |
|
||||||
| =merlin-occurences= | =SPC c D= | lookup references |
|
| =merlin-occurences= | =SPC c D= | lookup references |
|
||||||
| =merlin-document= | =K= | lookup documentation |
|
| =merlin-document= | =K= | lookup documentation |
|
||||||
|
| =merlin-imenu= | =SPC / i= | symbol lookup in file |
|
||||||
|
| =merlin-iedit-occurrences= | =v R= | visual refactor identifier under point (multiple cursors) |
|
||||||
| =utop= | =SPC o r= | open =utop= as REPL |
|
| =utop= | =SPC o r= | open =utop= as REPL |
|
||||||
| =utop-eval-region= | =SPC c e= | evaluate selected region in =utop= |
|
| =utop-eval-region= | =SPC c e= | evaluate selected region in =utop= |
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user