further attempts to get lsp working with jdtls
parent
c9d8d349e2
commit
37de679729
|
@ -1,8 +1,27 @@
|
|||
local lsp = require'lspconfig'
|
||||
local omnisharp = "/usr/bin/omnisharp"
|
||||
local jdtls = "/home/atomic/jdtls/launch"
|
||||
|
||||
lsp.clangd.setup{}
|
||||
lsp.rust_analyzer.setup{}
|
||||
lsp.omnisharp.setup{cmd={omnisharp, "--languageserver", "--hostPID", tostring(vim.fn.getpid())}}
|
||||
lsp.jdtls.setup{cmd={jdtls}}
|
||||
|
||||
local workspace_dir = vim.fn.fnamemodify(vim.fn.getcwd(), ':p:h:t')
|
||||
local config = {
|
||||
cmd = {
|
||||
"/usr/bin/java",
|
||||
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
|
||||
"-Dosgi.bundles.defaultStartLevel=4",
|
||||
"-Declipse.product=org.eclipse.jdt.ls.core.product",
|
||||
"-Dlog.level=ALL",
|
||||
"-noverify",
|
||||
"-Xmx1G",
|
||||
"-jar", "/home/atomic/jdtls/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar",
|
||||
"-configuration", "/home/atomic/jdtls/config_linux",
|
||||
"-data", "/home/atomic/workspaces" .. workspace_dir,
|
||||
"--add-modules=ALL-SYSTEM",
|
||||
"--add-opens java.base/java.util=ALL-UNNAMED",
|
||||
"--add-opens java.base/java.lang=ALL-UNNAMED",
|
||||
},
|
||||
}
|
||||
require'jdtls.setup'.add_commands()
|
||||
require'jdtls'.start_or_attach(config)
|
||||
|
|
Loading…
Reference in New Issue