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",
"dune",
},
root_markers = {
"*.opam",
"esy.json",
"package.json",
".git",
"dune-project",
"dune-workspace",
"*.ml",
},
root_dir = function(bufnr, on_dir)
local util = require("lspconfig.util")
local fname = vim.api.nvim_buf_get_name(bufnr)
--stylua: ignore
on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname))
end,
},
},
},