Skip to content

Commit

Permalink
Fix nvim jdtls
Browse files Browse the repository at this point in the history
  • Loading branch information
dparo committed Aug 30, 2024
1 parent edc68c9 commit f7c1455
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions roles/neovim/files/lua/lsp/servers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,19 @@ M.list = {
-- NOTE(d.paro): At the time of writing, Wed 23 2022, eclipse.jdt.ls requires Java 17 or higher
-- See https://github.com/mfussenegger/nvim-jdtls#configuration-quickstart
-- If this ever changes in the future
-- https://github.com/eclipse-jdtls/eclipse.jdt.ls#running-from-the-command-line
"/usr/lib/jvm/java-17-openjdk/bin/java",
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
"-Dosgi.bundles.defaultStartLevel=4",
"-Declipse.product=org.eclipse.jdt.ls.core.product",
"-Djava.maven.downloadSources=true",
"-Dlog.protocol=true",
"-Dlog.level=ALL",
"-Djava.eclipse.downloadSources=true",
"-Dlog.protocol=false",
"-Dlog.level=WARNING", -- -Dlog.level=ALL
-- https://projectlombok.org/
"-javaagent:" .. path.concat { nvim_data_path, "mason", "packages", "jdtls", "lombok.jar" },
"-Xms1g",
"-Xms256m",
"-Xmx4G",
"--add-modules=ALL-SYSTEM",
"--add-opens",
"java.base/java.util=ALL-UNNAMED",
Expand Down Expand Up @@ -253,6 +256,7 @@ M.list = {
settings = {
jdt_uri_timeout_ms = 20000,
java = {
autobuild = true,
maven = {
downloadSources = true,
},
Expand All @@ -263,6 +267,20 @@ M.list = {
staticStarThreshold = 9999,
},
},
cleanup = {
actionsOnSave = {
"qualifyMembers",
"qualifyStaticMembers",
"addOverride",
"addDeprecated",
"stringConcatToTextBlock",
"invertEquals",
"addFinalModifier",
"instanceofPatternMatch",
"lambdaExpression",
"switchExpression"
}
},
codeGeneration = {
toString = {
template = "${object.className}{${member.name()}=${member.value}, ${otherMembers}}",
Expand Down

0 comments on commit f7c1455

Please sign in to comment.