fix(ocaml): use root_dir instead of root_markers for globs support

This commit is contained in:
Iordanis Petkakis 2025-09-15 23:36:47 +03:00
parent 14d2a9baa1
commit 4b9830d4d8

View file

@ -26,15 +26,12 @@ return {
"reason", "reason",
"dune", "dune",
}, },
root_markers = { root_dir = function(bufnr, on_dir)
"*.opam", local util = require("lspconfig.util")
"esy.json", local fname = vim.api.nvim_buf_get_name(bufnr)
"package.json", --stylua: ignore
".git", on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname))
"dune-project", end,
"dune-workspace",
"*.ml",
},
}, },
}, },
}, },