aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/ocamlls.lua
blob: 1c5b8185531784617b96c21f630505d8b68f50a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'

local server_name = 'ocamlls'
local bin_name = 'ocaml-language-server'

configs[server_name] = {
  default_config = {
    cmd = { bin_name, '--stdio' },
    filetypes = { 'ocaml', 'reason' },
    root_dir = util.root_pattern('*.opam', 'esy.json', 'package.json'),
  },
  docs = {
    description = [[
https://github.com/ocaml-lsp/ocaml-language-server

`ocaml-language-server` can be installed via `npm`
```sh
npm install -g ocaml-langauge-server
```
    ]],
    default_config = {
      root_dir = [[root_pattern("*.opam", "esy.json", "package.json")]],
    },
  },
}