nvim: Fix Java LSP configuration
This commit is contained in:
parent
589872bd37
commit
59e0bc692b
2 changed files with 44 additions and 65 deletions
|
|
@ -75,3 +75,47 @@ vim.lsp.config('tsserver', {
|
|||
root_dir = vim.fs.root(0, {'.git', 'package.json'}),
|
||||
capabilities = capabilities,
|
||||
})
|
||||
-- Java
|
||||
require("jdtls").setup_dap({
|
||||
hotcodereplace = "auto",
|
||||
})
|
||||
vim.lsp.config("jdtls", {
|
||||
init_options = {
|
||||
bundles = {
|
||||
vim.fn.glob("/usr/share/java-debug/*.jar", 1),
|
||||
}
|
||||
},
|
||||
settings = {
|
||||
java = {
|
||||
autobuild = {
|
||||
enabled = true,
|
||||
},
|
||||
saveActions = {
|
||||
organizeImports = true,
|
||||
},
|
||||
signatureHelp = {
|
||||
enabled = true,
|
||||
description = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
format = {
|
||||
enable = true,
|
||||
settings = {
|
||||
url = "/home/oliver/Dokumente/Gallery Systems/Products/GS Eclipse Formatter Java.xml",
|
||||
},
|
||||
},
|
||||
codeGeneration = {
|
||||
insertionLocation = 'lastMember',
|
||||
hashCodeEquals = {
|
||||
useInstanceof = true,
|
||||
useJava7Objects = true,
|
||||
},
|
||||
},
|
||||
telemetry = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.enable("jdtls")
|
||||
|
|
|
|||
Loading…
Reference in a new issue