ocaml.md

 1---
 2title: OCaml
 3description: "Configure OCaml language support in Zed, including language servers, formatting, and debugging."
 4---
 5
 6# OCaml
 7
 8OCaml support is available through the [OCaml extension](https://github.com/zed-extensions/ocaml).
 9
10- Tree-sitter: [tree-sitter/tree-sitter-ocaml](https://github.com/tree-sitter/tree-sitter-ocaml)
11- Language Server: [ocaml/ocaml-lsp](https://github.com/ocaml/ocaml-lsp)
12
13## Setup Instructions
14
15If you have the development environment already setup, you can skip to [Launching Zed](#launching-zed)
16
17### Using Opam
18
19Opam is the official package manager for OCaml and is highly recommended for getting started with OCaml. To get started using Opam, please follow the instructions provided [here](https://ocaml.org/install).
20
21Once you install opam and setup a switch with your development environment as per the instructions, you can proceed.
22
23### Launching Zed
24
25By now you should have `ocamllsp` installed, you can verify so by running
26
27```sh
28ocamllsp --help
29```
30
31in your terminal. If you get a help message, you're good to go. If not, please revisit the installation instructions for `ocamllsp` and ensure it's properly installed.
32
33With that aside, we can now launch Zed. Given how the OCaml package manager works, we require you to run Zed from the terminal, so please make sure you install the [Zed cli](https://zed.dev/features#cli) if you haven't already.
34
35Once you have the cli, simply from a terminal, navigate to your project and run
36
37```sh
38zed .
39```
40
41You should now have Zed running with OCaml support, with no additional setup required.