1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 22:50:05 +08:00
SpaceVim/bundle/nvim-lspconfig/lua/lspconfig/server_configurations/ocamlls.lua

29 lines
663 B
Lua
Raw Normal View History

local util = require 'lspconfig.util'
2021-10-05 15:13:10 +08:00
local bin_name = 'ocaml-language-server'
local cmd = { bin_name, '--stdio' }
2021-10-05 15:13:10 +08:00
if vim.fn.has 'win32' == 1 then
cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
end
return {
2021-10-05 15:13:10 +08:00
default_config = {
cmd = cmd,
2021-10-05 15:13:10 +08:00
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-language-server
2021-10-05 15:13:10 +08:00
```
]],
default_config = {
root_dir = [[root_pattern("*.opam", "esy.json", "package.json")]],
},
},
}