An objective camel
This module adds OCaml support to Doom Emacs, powered by tuareg-mode.
- Code completion, documentation look-up, code navigation and refactoring (merlin)
- Type, documentation and function argument display on idle (merlin-eldoc)
- REPL (utop)
- Syntax-checking (
- Auto-indentation (ocp-indent)
- Code formatting (ocamlformat)
- Dune file format (dune)
This module has no dedicated maintainers. Become a maintainer?
1.2. Module flags
This module has no flags.
set-ligatures!is called with the full tuareg prettify symbol list, this can cause columns to change as certain keywords are shortened (e.g. fun becomes λ.
tuareg-opam-update-envis called the first time tuareg is loaded
3. TODO Usage
This module’s usage documentation is incomplete. Complete it?
- The following files should have syntax highlighting support:
merlin-modeis activated whenever a .merlin file is found (including in a parent directory) and ocamlmerlin executable is present
- Line-based auto-indentation is provided by ocp-indent, if it is available.
|merlin-type-enclosing||<localleader> t||display type under point|
|tuareg-find-alternate-file||<localleader> a||switch between .ml and .mli|
|merlin-locate||g d||lookup definition|
|merlin-occurences||SPC c D||lookup references|
|merlin-imenu||SPC s 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-eval-region||SPC c e||evaluate selected region in utop|
4. TODO Configuration
This module’s configuration documentation is incomplete. Complete it?
- If :completion company is enabled then autocomplete is provided by merlin.
- When :checkers syntax is enabled then flycheck-ocaml is activated to do on-the-fly syntax/type checking via merlin, otherwise this is only done when the file is saved.
- Spell checking is activated in comments if :checkers spell is active.
- A REPL is provided if utop is installed and :tools eval is active.
- If :editor format is enabled, the ocamlformat executable is available and there is an .ocamlformat file present then format-all-buffer is bound to 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).
There are no known problems with this module. Report one?
6. TODO Appendix
This module has no appendix yet. Write one?