diff options
| author | Georgy Komarov <jubnzv@gmail.com> | 2020-03-28 16:39:10 +0300 |
|---|---|---|
| committer | Georgy Komarov <jubnzv@gmail.com> | 2020-03-28 16:39:10 +0300 |
| commit | d500455f076a542be627f376b6a3b1aaf46221ca (patch) | |
| tree | cd92eefec4ee73b9c0343b844bdf99b96926c844 /lua/nvim_lsp | |
| parent | Add CodeQL support (#138) (diff) | |
| download | nvim-lspconfig-d500455f076a542be627f376b6a3b1aaf46221ca.tar nvim-lspconfig-d500455f076a542be627f376b6a3b1aaf46221ca.tar.gz nvim-lspconfig-d500455f076a542be627f376b6a3b1aaf46221ca.tar.bz2 nvim-lspconfig-d500455f076a542be627f376b6a3b1aaf46221ca.tar.lz nvim-lspconfig-d500455f076a542be627f376b6a3b1aaf46221ca.tar.xz nvim-lspconfig-d500455f076a542be627f376b6a3b1aaf46221ca.tar.zst nvim-lspconfig-d500455f076a542be627f376b6a3b1aaf46221ca.zip | |
Add ocaml-lsp support
Diffstat (limited to 'lua/nvim_lsp')
| -rw-r--r-- | lua/nvim_lsp/ocamllsp.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lua/nvim_lsp/ocamllsp.lua b/lua/nvim_lsp/ocamllsp.lua new file mode 100644 index 00000000..9e426aba --- /dev/null +++ b/lua/nvim_lsp/ocamllsp.lua @@ -0,0 +1,28 @@ +local configs = require 'nvim_lsp/configs' +local util = require 'nvim_lsp/util' + +configs.ocamllsp = { + default_config = { + cmd = {"ocamllsp",}; + filetypes = {'ocaml', 'reason'}; + root_dir = function(fname) + return util.find_git_ancestor(fname) or vim.loop.os_homedir() + end; + }; + docs = { + description = [[ +https://github.com/ocaml/ocaml-lsp + +`ocaml-lsp` can be installed as described in [installation guide](https://github.com/ocaml/ocaml-lsp#installation). + +To install the lsp server in a particular opam switch: +```sh +opam pin add ocaml-lsp-server https://github.com/ocaml/ocaml-lsp.git +opam install ocaml-lsp-server +``` + ]]; + default_config = { + root_dir = [[root_pattern(".merlin", "package.json")]]; + }; + }; +} |
