Mason Failed to run config for nvim-java in vanilla config with lazy.nvim #393
-
|
Hello firends plugins/init.lua --java support plugin
{
"nvim-java/nvim-java",
dependencies = {
"nvim-java/lua-async-await",
"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("configs.nvim-java").setup()
end,
},configs/nvim-java.lua local M = {}
M.setup = function()
require("java").setup()
require("lspconfig").jdtls.setup {}
end
return Mwhen i comment out require("java").setup()i at least get the lsp working in gradle project but no debugger (i haven't check the tests or lombok) if its important i am on nvim v0.11.1 full config |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
i got same error, this is because the mason using version 2 -- line 18
pkg:get_installed_version(function(success, version)
if success and version == package_version then
has_version = true
end
end)
-- line 35
local installed_version
pkg:get_installed_version(function(ok, version)
if not ok then
return
end
installed_version = version
end)to -- line 18
if pkg:is_installed() then
local installed_version = pkg:get_installed_version()
if installed_version == package_version then
has_version = true
end
end
-- line 35
local installed_version = pkg:get_installed_version() |
Beta Was this translation helpful? Give feedback.
-
|
thanks i guess for now i will stick with nvim-jdls i managed to everything work with it including debugger and tests |
Beta Was this translation helpful? Give feedback.

i got same error, this is because the mason using version 2
you can set the mason version to version 1
or
you can change manual in nvim-data\lazy\nvim-java\lua\java\utils\mason.lua
to