fix(jdtls): root_dir

This commit is contained in:
Folke Lemaitre
2025-09-15 20:44:14 +02:00
parent 23b9cdeb34
commit 271fecb067

View File

@@ -91,7 +91,6 @@ return {
table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar))
end
return {
root_dir = vim.fs.root(0, vim.lsp.config.jdtls.root_markers),
-- How to find the project name for a given root dir.
project_name = function(root_dir)
@@ -165,12 +164,10 @@ return {
end
end
local function attach_jdtls()
local fname = vim.api.nvim_buf_get_name(0)
-- Configuration can be augmented and overridden by opts.jdtls
local config = extend_or_override({
cmd = opts.full_cmd(opts),
root_dir = opts.root_dir(fname),
root_dir = vim.fs.root(0, vim.lsp.config.jdtls.root_markers),
init_options = {
bundles = bundles,
},