-
My -- removed unrelated config
require('lazy').setup({
-- removed unrelated config
{
'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',
},
},
}
},
},
-- removed unrelated config
})
require('java').setup({
java_home = "C:\\Program Files\\Java\\jdk-17"
})
require('lspconfig').jdtls.setup({
settings = {
java = {
configuration = {
runtimes = {
{
name = "JavaJDK-17",
path = "C:\\Program Files\\Java\\jdk-17",
default = true,
}
}
}
}
}
}) With this configuration if I start I even tried without whitespace in the path variable. But no luck:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@skaveesh Set jdk https://github.com/nvim-java/nvim-java?tab=readme-ov-file#wrench-configuration However, in your case, you want to disable openjdk installation. So, calling setup like below will override
Feel free to reopen if you have any issues. |
Beta Was this translation helpful? Give feedback.
@skaveesh Set jdk
auto_install
tofalse
in config. You cannot pass arbitrary properties likejava_home
to plugin setup and expect it to work. Since you are new, Almost 90% of lua neovim plugins has configuration information in the README. Here is this plugin's configuration. All the properties I have defined are the default meaning If you are fine with the default, just call setup without any parameters.require('java').setup()
https://github.com/nvim-java/nvim-java?tab=readme-ov-file#wrench-configuration
However, in your case, you want to disable openjdk installation. So, calling setup like below will override
auto_install
but use rest of the default parameters as it is.