Make sure you are on ocaml 4.14.0 or later.
For doom emacs:
SPC f p
to open the Doom config file dialog- Select
config.el
- Add
(setq lsp-ocaml-lsp-server-command '("esy" "ocamllsp" "--fallback-read-dot-merlin"))
- Restart emacs entirely
- Or: reload using
SPC h r r
then restart the LSP withM-x
=>lsp-workspace-restart
- Or: reload using