doomemacs/modules/lang/ocaml
Henrik Lissner 680d135062
bump: :lang
50ways2sayhard/dart-ts-mode@ab87873f25 -> 50ways2sayhard/dart-ts-mode@0e42336bf7
JuliaEditorSupport/julia-emacs@aadf29523a -> JuliaEditorSupport/julia-emacs@1478898ea0
agda/agda@5cf984c3d2 -> agda/agda@6310545817
bricka/emacs-kotlin-ts-mode@051c9ef534 -> bricka/emacs-kotlin-ts-mode@b318a64a7f
clojure-emacs/cider@ae247d8845 -> clojure-emacs/cider@75dc57aebe
clojure-emacs/clojure-mode@bddba12e96 -> clojure-emacs/clojure-mode@f44ea50308
clojure-emacs/clojure-ts-mode@96fdffcbe9 -> clojure-emacs/clojure-ts-mode@f47fefb5d7
cpitclaudel/company-coq@78ed04ce39 -> cpitclaudel/company-coq@1fc1d8f2d5
davazp/graphql-mode@ef757c6ce2 -> davazp/graphql-mode@d7f105a4bf
emacs-jupyter/jupyter@de89cbeca8 -> emacs-jupyter/jupyter@242fdc709c
emacs-lsp/lsp-dart@fd82395180 -> emacs-lsp/lsp-dart@166e4f2ba1
emacs-rustic/rustic@cb013cd217 -> emacs-rustic/rustic@eea94386bf
emacs-straight/auctex@1939acb54b -> emacs-straight/auctex@f0c4b1dcc9
erlang/otp@f80e9c1c4a -> erlang/otp@ea2bfd02be
hvesalai/emacs-sbt-mode@cc68728a6e -> hvesalai/emacs-sbt-mode@c353df6aa1
jrblevin/markdown-mode@9de2df5a9f -> jrblevin/markdown-mode@f8d1be7cd5
mekeor/nael@3ee1cf286d -> mekeor/nael@fbfb675736
nix-community/nix-emacs@053a2d5110 -> nix-community/nix-emacs@e241b58c9e
nix-community/nix-ts-mode@625306cf9c -> nix-community/nix-ts-mode@3198317121
ocaml/dune@7a7d49206f -> ocaml/dune@141393af40
ocaml/merlin@1c4148af05 -> ocaml/merlin@fad4a2785c
org-roam/org-roam@b4857fd7a1 -> org-roam/org-roam@7cd906b6f8
polymode/polymode@14b1fd8d2a -> polymode/polymode@4604f55cc0
rust-lang/rust-mode@f68ddca5c2 -> rust-lang/rust-mode@668069ad8b
2026-03-02 19:45:08 -05:00
..
.doommodule feat: add .doommodule files 2024-09-14 20:47:39 -04:00
autoload.el fix(ocaml): don't prefix comment continuation lines with * 2026-02-15 21:55:43 -05:00
config.el refactor(lib): deprecate pushnew! 2026-03-01 18:10:43 -05:00
doctor.el refactor(ocaml): remove tree-sitter support 2025-08-27 17:29:28 +02:00
packages.el bump: :lang 2026-03-02 19:45:08 -05:00
README.org refactor(ocaml): remove tree-sitter support 2025-08-27 17:29:28 +02:00

:lang ocaml

Description   unfold

This module adds OCaml support to Doom Emacs, powered by doom-package:tuareg.

Maintainers

This module needs a maintainer. Become a maintainer?

Module flags

+lsp
Enable LSP support for tuareg-mode. Requires doom-module::tools lsp and a langserver (supports ocaml-language-server).

Hacks

  • 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 λ).
  • opam-switch-set-switch is called the first time doom-package:tuareg and subsequently doom-package:opam-switch-mode are loaded

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module requires the following packages available through opam:

  • merlin
  • utop
  • ocp-indent
  • dune
  • ocamlformat

TODO Usage

󱌣 This module's usage documentation is incomplete. Complete it?

  • The following files should have syntax highlighting support: .ml{i,p,y,}, .eliom{i,}, jbuild, dune, opam
  • merlin-mode is 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.
Command Key Description
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-document K lookup documentation
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
opam-switch-set-switch <localleader> w evaluate selected region in utop

TODO Configuration

󱌣 This module's configuration documentation is incomplete. Complete it?

  • If doom-module::completion company is enabled then autocomplete is provided by doom-package:merlin
  • When doom-module::checkers syntax is enabled then doom-package:flycheck-ocaml is activated to do on-the-fly syntax/type checking via doom-package:merlin, otherwise this is only done when the file is saved.
  • Spell checking is activated in comments if doom-module::checkers spell is active
  • A REPL is provided if doom-package:utop is installed and doom-module::tools eval is active
  • If doom-module::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 doom-module::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)

Run $ doom sync to install all packages and $ doom doctor to diagnose missing tools.

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?