mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-12-25 12:14:19 +01:00
fix(lspconfig): remove all usage of lspconfig
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user