Skip to content

Extending intializationOptions with which eclipse.jdt.ls starts #139

Answered by EpsilonKu
zytact asked this question in Q&A
Discussion options

You must be logged in to vote

U need write it before require('jdtls').start_or_attach(config). Set config like array or object (example).

local config = {}
local workspace_folder = home .. "/.workspace/" .. vim.fn.fnamemodify(root_dir, ":p:h:t")
config.init_options = {
  bundles = {
    vim.fn.glob("path/to/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-*.jar")
  }
}
config.cmd = {"jdtls.sh", workspace}
config.root_dir = require("jdtls.setup").find_root({"gradle.build", "pom.xml"})

require ('jdtls').start_or_attach (config)

Hope u understand.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zytact
Comment options

Answer selected by zytact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants