Replies: 1 comment 2 replies
-
Okay it was a problem with my setup, although I'm still not sure why it was wrong. But anyways using this config seems to have made it to work: return {
"nvim-java/nvim-java",
dependencies = { "neovim/nvim-lspconfig" },
config = function()
require("java").setup({
jdk = {
auto_install = false,
},
})
require('lspconfig').jdtls.setup({
servers = {
jdtls = {
settings = {
java = {
configuration = {
runtimes = {
{
name = "JavaSE-17",
path = "/usr/lib/jvm/java-17-openjdk/",
},
{
name = "JavaSE-21",
path = "/usr/lib/jvm/java-21-openjdk/",
default = true,
}
}
}
}
}
},
},
})
end,
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm having trouble getting this plugin to work. I followed the installation instructions for LazyVim but I'm getting this errors:
Here's my config.
Not sure if it's a recent bug or if I'm missing something in the configuration. But I've been looking for issues with similar problems and haven't found much. I did see mention that I should have an up to date version of Lazy (which I have,
version 11.14.1
) and someone saying he had to run:MasonUpdate
for the plugin to work, but that didn't help.Also mason hasn't automatically installed anything, although that may be because it never got the chance due to the
lspconfig
error.Edit: Also just to clarify, I'm not using LazyVim. I'm making a custom config so I don't have any defaults included from LazyVim. I did try to look into the LazyVim repo to check what I may be missing, but there was a lot of stuff and they're not even using
nvim-java
, they usenvim-jdtls
directly, so I had no clue what could be needed.And finally, this guy's config mentioned in this issue seems to work and we have pretty much the same configs regarding
nvim-java
.Beta Was this translation helpful? Give feedback.
All reactions