2024-07-15 19:58:28 +00:00
|
|
|
Cmd = 'c:/Users/nigel/Appdata/Local/nvim-data/mason/bin/jdtls.cmd'
|
|
|
|
JavaDebug = vim.fn.glob("C:/Users/nigel/AppData/Local/nvim-data/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-0.52.0.jar", 1)
|
2024-03-28 20:45:53 +00:00
|
|
|
local config = {
|
|
|
|
cmd = {Cmd},
|
|
|
|
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
|
|
|
init_options = {
|
|
|
|
bundles = {
|
|
|
|
JavaDebug
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
require('jdtls').start_or_attach(config)
|
|
|
|
require('jdtls').setup_dap({hotcodreplace='auto'})
|
|
|
|
require('jdtls.dap').setup_dap_main_class_configs()
|
2024-09-23 08:38:23 +00:00
|
|
|
|
|
|
|
-- Set up lspconfig.
|
|
|
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
|
|
require('lspconfig')['jdtls'].setup({
|
|
|
|
capabilities = capabilities
|
|
|
|
})
|