Skip to content

ocamllsp

https://github.com/ocaml/ocaml-lsp

ocaml-lsp can be installed as described in installation guide.

To install the lsp server in a particular opam switch:

opam pin add ocaml-lsp-server https://github.com/ocaml/ocaml-lsp.git
opam install ocaml-lsp-server

Setup

require'lspconfig'.ocamllsp.setup{}

Default values

cmd = { "ocamllsp" }
filetypes = { "ocaml", "ocaml.menhir", "ocaml.interface", "ocaml.ocamllex", "reason" }
get_language_id = function(_, ftype)
  return language_id_of[ftype]
end
root_dir = function(startpath)
    return M.search_ancestors(startpath, matcher)
  end
Back to top