mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-21 20:11:06 +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))
|
||||
end
|
||||
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.
|
||||
project_name = function(root_dir)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,19 @@ return {
|
|||
"reason",
|
||||
"dune",
|
||||
},
|
||||
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,
|
||||
root_markers = {
|
||||
function(name)
|
||||
return name:match(".*%.opam$")
|
||||
end,
|
||||
"esy.json",
|
||||
"package.json",
|
||||
".git",
|
||||
"dune-project",
|
||||
"dune-workspace",
|
||||
function(name)
|
||||
return name:match(".*%.ml$")
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue