mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 08:35:48 +02:00
enc: testing java jdtls linux
This commit is contained in:
parent
f5adb4bb7d
commit
ece7dd2b9f
1 changed files with 26 additions and 0 deletions
|
@ -103,6 +103,32 @@ return {
|
|||
require("lspconfig")[server_name].setup(option)
|
||||
end
|
||||
end,
|
||||
["jdtls"] = function()
|
||||
require("lspconfig").jdtls.setup({
|
||||
on_attach = require("user.lsp.handlers").on_attach,
|
||||
capabilities = require("user.lsp.handlers").capabilities,
|
||||
cmd = {
|
||||
"jdtls",
|
||||
"-configuration",
|
||||
vim.fn.expand("$HOME") .. "/.cache/jdtls/config",
|
||||
"-data",
|
||||
vim.fn.expand("$HOME") .. "/.cache/jdtls/workspace",
|
||||
},
|
||||
filetypes = { "java" },
|
||||
root_dir = require("lspconfig.util").root_pattern(
|
||||
-- Single-module projects
|
||||
{
|
||||
"build.xml", -- Ant
|
||||
"pom.xml", -- Maven
|
||||
"settings.gradle", -- Gradle
|
||||
"settings.gradle.kts", -- Gradle
|
||||
},
|
||||
-- Multi-module projects
|
||||
{ "build.gradle", "build.gradle.kts" }
|
||||
) or vim.fn.getcwd(),
|
||||
singe_file_support = true,
|
||||
})
|
||||
end,
|
||||
})
|
||||
require("user.lsp.handlers").setup()
|
||||
end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue