Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 557 Bytes

ocaml_lsp_setup.md

File metadata and controls

25 lines (18 loc) · 557 Bytes

OCaml LSP Settings

OCaml Environment

First install ocaml and the package manager opam. Then install packages with opam:

opam install utop ocaml-lsp-server ocamlformat

LSP Configuration

Add to the Neovim configure files once the nvim-lsconfig is installed:

require 'lspconfig'.ocamllsp.setup {
    root_dir = lspconfig.util.root_pattern(".ocamlformat"),
    on_attach = on_attach,
    capabilities = capabilities,
}

For project root path detection, create a OCaml formatting configuration file .ocamlformat.