OCaml has a pretty decent language server [1]. You can pair it with the excellent OCaml vscode plugin [2], or any other LSP plugin for the editor of your choice.
[1] https://github.com/ocaml/ocaml-lsp/
[2] https://marketplace.visualstudio.com/items?itemName=ocamllab...