Description
Hi, I am having problems getting Lombok to work on nvim-basic-ide.
I installed jdtls using Mason and added it to the server's table. When I open a project that has lombok on it, it recognizes the lombok anotations and even gives me autocompletion and spelling errors, but when I try to use autogenerated methods, such as @Getter, @Setter, and @AllArgsConstructor, on another class, it says that those methods do not exist, and on the class that has these anotations, it gives me warnings saying that the properties are not been used.
I got it to work when I uninstalled jdtls from the Mason UI, installed it on my system using jdtls-launcher and added the following settings to jdtls:
return {
cmd = { "jdtls" },
root_dir = function(fname)
return require'lspconfig'.util.root_pattern('pom.xml', 'gradle.build', '.git')(fname) or vim.fn.getcwd()
end
}
But every time I open NeoVIM, Mason automatically starts installing jdtls again, and when it finishes installing, Lombok stops working.
It happens even when I remove jdtls from the ensure_installed table in mason-lspconfig settings.
I tried to use nvim-jdtls for this server instead of lspconfig, and it stopped automatically installing jdtls via Mason when I started NeoVIM, but Lombok stopped working too.
Does anyone know how to stop this behavior from lspconfig? or have another possible solution?
Thanks for the help.