nvim-config/lua/plugins/java-plugin.lua
2024-06-21 00:24:35 +08:00

45 lines
838 B
Lua

return {
"nvim-java/nvim-java",
dependencies = {
"nvim-java/lua-async-await",
"nvim-java/nvim-java-refactor",
"nvim-java/nvim-java-core",
"nvim-java/nvim-java-test",
"nvim-java/nvim-java-dap",
"MunifTanjim/nui.nvim",
"neovim/nvim-lspconfig",
"mfussenegger/nvim-dap",
{
"williamboman/mason.nvim",
opts = {
registries = {
"github:nvim-java/mason-registry",
"github:mason-org/mason-registry",
},
},
},
},
config = function()
require("java").setup({
root_markers = {
"settings.gradle",
"settings.gradle.kts",
"pom.xml",
"build.gradle",
"mvnw",
"gradlew",
"build.gradle",
"build.gradle.kts",
".git",
},
java_test = {
enable = true,
},
java_debug_adapter = {
enable = true,
},
})
require("lspconfig").jdtls.setup({})
end,
}