The extension automatically detects how to start ocamllsp based on your project setup, using the following priority order:
- Dune Package Management — If
duneis in PATH anddune pkg enabledsucceeds, starts the LSP viadune tools exec ocamllsp. - opam — If
opamis in PATH, starts viaopam exec -- ocamllsp. If a local switch (_opam/) is found in the project root, it is used automatically. - Direct — Falls back to running
ocamllspdirectly from PATH.
OCamllsp can be configured via Zed settings.json.
For instance, all inlay hints can be enabled using the following:
"lsp": {
"ocamllsp": {
"settings": {
"inlayHints": {
"hintFunctionParams": true,
"hintPatternVariables": true,
"hintLetBindings": true
}
}
}
}The configuration options available are documented here.
To develop this extension, see the Developing Extensions section of the Zed docs.