-
Notifications
You must be signed in to change notification settings - Fork 305
Servers Java
Alberto Fanjul edited this page Apr 10, 2019
·
8 revisions
- Java 1.8 or later
mkdir -p ~/lsp/eclipse.jdt.ls
cd ~/lsp/eclipse.jdt.ls
curl -L https://download.eclipse.org/jdtls/milestones/0.35.0/jdt-language-server-0.35.0-201903142358.tar.gz -O
tar xf jdt-language-server-0.35.0-201903142358.tar.gz
if executable('java') && filereadable(expand('~/lsp/eclipse.jdt.ls/plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar'))
au User lsp_setup call lsp#register_server({
\ 'name': 'eclipse.jdt.ls',
\ 'cmd': {server_info->[
\ 'java',
\ '-Declipse.application=org.eclipse.jdt.ls.core.id1',
\ '-Dosgi.bundles.defaultStartLevel=4',
\ '-Declipse.product=org.eclipse.jdt.ls.core.product',
\ '-Dlog.level=ALL',
\ '-noverify',
\ '-Dfile.encoding=UTF-8',
\ '-Xmx1G',
\ '-jar',
\ expand('~/lsp/eclipse.jdt.ls/plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar'),
\ '-configuration',
\ expand('~/lsp/eclipse.jdt.ls/config_win'),
\ '-data',
\ getcwd()
\ ]},
\ 'whitelist': ['java'],
\ })
endif
Change config_win
according to the environment.
- Windows:
config_win
- Linux:
config_linux
- Mac:
config_mac