Lombok, Spring and Java #727
-
|
Hi, I can't seem to figure out how to enable lombok support. I have JDTLS working with the following { nvf, ... }:
{
imports = [ nvf.homeManagerModules.default ];
programs.nvf = {
enable = true;
settings = {
vim = {
viAlias = true;
vimAlias = true;
languages = {
java = {
enable = true;
lsp.enable = true;
treesitter.enable = true;
};
#...
};
git.enable = true;
telescope.enable = true;
treesitter.enable = true;
statusline.lualine.enable = true;
#...
};
};
};
}Anyone have an example config which works? I am also curious if there is support for Spring? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
I do not have much experience with Java. For Kotlin and Java, anything beyond Jetbrains IDEs seem to be on life support at best, although I am interested in supporting more use cases. I'm going to look into Lombok support (which isn't directly supported, unless it's supposed to work OOTB with JDTLS) and possibly even Spring as soon as I get the chance. Edit: according to lspconfig documentation, lombok should be supported with export JDTLS_JVM_ARGS="-javaagent:$HOME/.local/share/java/lombok.jar"I found spring-boot.nvim for Spring Boot, which I can add as an extension for the Java language module. |
Beta Was this translation helpful? Give feedback.
The problem was, in fact, that the environment variable is not being properly propagated to the jdtls binary. With how Nix operates, I am not entirely surprised. The following setup allows Lombok to function properly, although I am not sure which extent. LSP hover seems to be working at least, so that is a good start.
I think
.outPathcan also be replaced with.bin