mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 00:49:01 +02:00
enc: testing jdtls linux
This commit is contained in:
parent
34d23ba464
commit
a988f497e1
2 changed files with 28 additions and 28 deletions
|
@ -103,32 +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,
|
||||
-- ["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,
|
||||
|
|
|
@ -2,9 +2,9 @@ return {
|
|||
cmd = {
|
||||
"jdtls",
|
||||
"-configuration",
|
||||
vim.fn.expand("$HOME") .. "/.cache/jdtls/config",
|
||||
vim.fn.stdpath("cache") .. "/jdtls/config",
|
||||
"-data",
|
||||
vim.fn.expand("$HOME") .. "/.cache/jdtls/workspace",
|
||||
vim.fn.stdpath("cache") .. "/jdtls/workspace",
|
||||
},
|
||||
filetypes = { "java" },
|
||||
root_dir = require("lspconfig.util").root_pattern(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue