Open sify21 opened 11 months ago
A workaround is to comment this line:
"java.jdt.ls.vmargs": "-javaagent:/home/sify/.config/coc-lsp/lombok.jar",
in coc-settings.json
Then how to specify lombok location to coc-java?
Try adding the version number of lombok to the actual lombok jar filename. For example changing "lombok.jar" to "lombok-1.18.28.jar". Make sure to follow to format precisely. Hope this helps! :)
Try adding the version number of lombok to the actual lombok jar filename. For example changing "lombok.jar" to "lombok-1.18.28.jar". Make sure to follow to format precisely. Hope this helps! :)
This is insane. It works.
Wow! It worked out! o.O
https://github.com/neoclide/coc-java/blob/master/src/lombokSupport.ts#L24 We're using regex to "validate" the lombok version.
Funny thing is I used nix to supply the lombok, and this regex parsed my javaagent and found the version tag in the path, rather than the filename, and said it was the wrong version.
I think there must be a better way to validate (or not validate) the lombok version.
Hey so easy workaround, set this: "java.jdt.ls.lombokSupport.enabled": true
- and remove the javaagent flag from the vmargs. I don't remember this working well for myself in the past, but it works now.
Also, if you want to use your own version of lombok, this works: https://github.com/neoclide/coc-java/issues/240#issuecomment-1453010150
Same as trev-dev, I get this error when my settings are:
"java.jdt.ls.lombokSupport.enabled": true,
"java.jdt.ls.vmargs": "-javaagent:/home/medwards/.local/share/lombok/lombok.1.18.24.jar"
Disabling Lombok support ends up working fine.
Removing vmargs will not crash the LSP anymore, but it will not process the lombok annotations either - I have to add the lombok jar to ~/.config/coc/extensions/node_modules/coc-java/lombok/
os
:CocInfo
java-related coc-settings.json