Skip to content

Prelude OCaml

Note

This module builds on top of the shared Programming module.

Overview

Prelude provides a modern OCaml development experience powered by TreeSitter and LSP:

  • neocaml - a TreeSitter-powered major mode for OCaml (includes built-in support for Dune files and utop)
  • ocaml-eglot - OCaml-specific LSP extensions via Eglot (enabled when prelude-lsp-client is set to eglot, the default)

LSP integration provides code completion, type information, diagnostics, code navigation, and refactoring out of the box.

Prerequisites

You need OPAM and the OCaml LSP server installed:

opam install ocaml-lsp-server

Note

This module requires Emacs 29.1+ (for TreeSitter support).