mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-22 20:41:08 +00:00
fix(lspconfig): remove all usage of lspconfig
This commit is contained in:
parent
a467ce074f
commit
36b41911ab
2 changed files with 16 additions and 7 deletions
|
|
@ -91,7 +91,9 @@ return {
|
||||||
table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar))
|
table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar))
|
||||||
end
|
end
|
||||||
return {
|
return {
|
||||||
root_dir = require("lspconfig.util").root_pattern(vim.lsp.config.jdtls.root_markers),
|
root_dir = function(path)
|
||||||
|
return vim.fs.root(path, vim.lsp.config.jdtls.root_markers)
|
||||||
|
end,
|
||||||
|
|
||||||
-- How to find the project name for a given root dir.
|
-- How to find the project name for a given root dir.
|
||||||
project_name = function(root_dir)
|
project_name = function(root_dir)
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,21 @@ return {
|
||||||
"reason",
|
"reason",
|
||||||
"dune",
|
"dune",
|
||||||
},
|
},
|
||||||
root_dir = function(bufnr, on_dir)
|
root_markers = {
|
||||||
local util = require("lspconfig.util")
|
function(name)
|
||||||
local fname = vim.api.nvim_buf_get_name(bufnr)
|
return name:match(".*%.opam$")
|
||||||
--stylua: ignore
|
end,
|
||||||
on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname))
|
"esy.json",
|
||||||
|
"package.json",
|
||||||
|
".git",
|
||||||
|
"dune-project",
|
||||||
|
"dune-workspace",
|
||||||
|
function(name)
|
||||||
|
return name:match(".*%.ml$")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue