diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/ocamllsp.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lua/lspconfig/server_configurations/ocamllsp.lua b/lua/lspconfig/server_configurations/ocamllsp.lua index 15284716..6cff66b6 100644 --- a/lua/lspconfig/server_configurations/ocamllsp.lua +++ b/lua/lspconfig/server_configurations/ocamllsp.lua @@ -6,6 +6,7 @@ local language_id_of = { ocamlinterface = 'ocaml.interface', ocamllex = 'ocaml.ocamllex', reason = 'reason', + dune = 'dune' } local get_language_id = function(_, ftype) @@ -15,8 +16,8 @@ end return { default_config = { cmd = { 'ocamllsp' }, - filetypes = { 'ocaml', 'ocaml.menhir', 'ocaml.interface', 'ocaml.ocamllex', 'reason' }, - root_dir = util.root_pattern('*.opam', 'esy.json', 'package.json', '.git'), + filetypes = { 'ocaml', 'ocaml.menhir', 'ocaml.interface', 'ocaml.ocamllex', 'reason', 'dune' }, + root_dir = util.root_pattern('*.opam', 'esy.json', 'package.json', '.git', 'dune-project', 'dune-workspace'), get_language_id = get_language_id, }, docs = { @@ -32,7 +33,7 @@ opam install ocaml-lsp-server ``` ]], default_config = { - root_dir = [[root_pattern("*.opam", "esy.json", "package.json", ".git")]], + root_dir = [[root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace")]], }, }, } |
