Skip to content

Commit 65a2d52

Browse files
chore(build): auto-generate docs
1 parent c942d50 commit 65a2d52

2 files changed

Lines changed: 32 additions & 14 deletions

File tree

docs/extras/lang/java.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ opts = function()
139139
table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar))
140140
end
141141
return {
142-
root_dir = require("lspconfig.util").root_pattern(vim.lsp.config.jdtls.root_markers),
142+
root_dir = function(path)
143+
return vim.fs.root(path, vim.lsp.config.jdtls.root_markers)
144+
end,
143145

144146
-- How to find the project name for a given root dir.
145147
project_name = function(root_dir)
@@ -208,7 +210,9 @@ end
208210
table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar))
209211
end
210212
return {
211-
root_dir = require("lspconfig.util").root_pattern(vim.lsp.config.jdtls.root_markers),
213+
root_dir = function(path)
214+
return vim.fs.root(path, vim.lsp.config.jdtls.root_markers)
215+
end,
212216

213217
-- How to find the project name for a given root dir.
214218
project_name = function(root_dir)

docs/extras/lang/ocaml.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,19 @@ opts = {
6969
"reason",
7070
"dune",
7171
},
72-
root_dir = function(bufnr, on_dir)
73-
local util = require("lspconfig.util")
74-
local fname = vim.api.nvim_buf_get_name(bufnr)
75-
--stylua: ignore
76-
on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname))
77-
end,
72+
root_markers = {
73+
function(name)
74+
return name:match(".*%.opam$")
75+
end,
76+
"esy.json",
77+
"package.json",
78+
".git",
79+
"dune-project",
80+
"dune-workspace",
81+
function(name)
82+
return name:match(".*%.ml$")
83+
end,
84+
},
7885
},
7986
},
8087
}
@@ -99,12 +106,19 @@ opts = {
99106
"reason",
100107
"dune",
101108
},
102-
root_dir = function(bufnr, on_dir)
103-
local util = require("lspconfig.util")
104-
local fname = vim.api.nvim_buf_get_name(bufnr)
105-
--stylua: ignore
106-
on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname))
107-
end,
109+
root_markers = {
110+
function(name)
111+
return name:match(".*%.opam$")
112+
end,
113+
"esy.json",
114+
"package.json",
115+
".git",
116+
"dune-project",
117+
"dune-workspace",
118+
function(name)
119+
return name:match(".*%.ml$")
120+
end,
121+
},
108122
},
109123
},
110124
},

0 commit comments

Comments
 (0)