Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ want, following options are available
},

jdtls = {
version = 'v1.37.0',
version = 'v1.43.0',
},

lombok = {
Expand All @@ -366,7 +366,7 @@ want, following options are available
-- load java test plugins
java_test = {
enable = true,
version = '0.40.1',
version = '0.43.0',
},

-- load java debugger plugins
Expand All @@ -377,11 +377,13 @@ want, following options are available

spring_boot_tools = {
enable = true,
version = '1.59.0',
},

jdk = {
-- install jdk using mason.nvim
auto_install = true,
version = '17.0.2',
},

notifications = {
Expand Down
10 changes: 6 additions & 4 deletions lua/java/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
---@field lombok { version: string }
---@field java_test { enable: boolean, version: string }
---@field java_debug_adapter { enable: boolean, version: string }
---@field spring_boot_tools { enable: boolean }
---@field jdk { auto_install: boolean }
---@field spring_boot_tools { enable: boolean, version: string }
---@field jdk { auto_install: boolean, version: string }
---@field notifications { dap: boolean }
---@field verification { invalid_order: boolean, duplicate_setup_calls: boolean, invalid_mason_registry: boolean }
local config = {
Expand All @@ -23,7 +23,7 @@ local config = {
},

jdtls = {
version = 'v1.37.0',
version = 'v1.43.0',
},

lombok = {
Expand All @@ -33,7 +33,7 @@ local config = {
-- load java test plugins
java_test = {
enable = true,
version = '0.40.1',
version = '0.43.0',
},

-- load java debugger plugins
Expand All @@ -44,11 +44,13 @@ local config = {

spring_boot_tools = {
enable = true,
version = '1.59.0',
},

jdk = {
-- install jdk using mason.nvim
auto_install = true,
version = '17.0.2',
},

notifications = {
Expand Down
7 changes: 5 additions & 2 deletions lua/java/startup/mason-dep.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,14 @@ function M.get_pkg_list(config)
})

if config.jdk.auto_install then
deps:push({ name = 'openjdk-17', version = '17.0.2' })
deps:push({ name = 'openjdk-17', version = config.jdk.version })
end

if config.spring_boot_tools.enable then
deps:push({ name = 'spring-boot-tools', version = '1.55.1' })
deps:push({
name = 'spring-boot-tools',
version = config.spring_boot_tools.version,
})
end

return deps
Expand Down