Is it possible to enable preview features?
I'm using records which is a preview feature in jdk 15. Because of that wherever I use a record I receive an error from the ls that says:
Records is a preview feature and disabled by default. Use --enable-preview to enable
Is there a way to enable preview features through coc-java? Or is this something we have to solve some other way?
Coc info:
Versions
vim version: VIM - Vi IMproved 8.2 8022539 node version: v12.19.0 coc.nvim version: 0.0.80-6e5a2aaeb5 coc.nvim directory: /home/joshu/.vim/plugged/coc.nvim term: dumb platform: linux
java.jdt.ls.vmargs configuration might help.
Hm for some reason the error is still popping up, here's the settings I put inside my coc-settings.json:
{
"java.home": "/usr/lib/jvm/bellsoft-java15-full-amd64/",
"java.jdt.ls.vmargs": "--enable-preview"
}
Looking at the log also it seems to be using the wrong jdk (although there are no errors on the imports of the jdk i set in java.home)
!SESSION 2021-03-09 06:35:51.497 -----------------------------------------------
eclipse.buildId=unknown
java.version=14.0.2
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -data /home/joshu/.config/coc/extensions/coc-java-data/jdt_ws_210701626dc161fb16bfa81456866cb9
Am I doing something wrong with the settings?
this might help, https://github.com/neoclide/coc-java/issues/131#issuecomment-1154565754
Checkout https://github.com/neoclide/coc-java/blob/master/Readme.md#compiler-warnings for customize compile option.