Skip to content

vim-lsp support for Java (eclipse.jdt.ls)

License

Notifications You must be signed in to change notification settings

lgranie/vim-lsp-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-lsp-java

Sets up vim-lsp for Java.

Installing

Dependencies

** Eclipse JDT Language Server **

This vim plugin depends on Eclipse JDT Language Server.

Install Eclipse JDT Language Server

Install the vim plugins

" Dependencies
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'

Plug 'lgranie/vim-lsp-java'

Configure vim-lsp-java

Edit your .vimrc file and configure like :

let g:vim_lsp_java = {
  \ 'eclipse_jdtls' : {
    \ 'repository': expand('~/opt/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository'),
    \ 'config': 'config_linux',
    \ 'workspace': expand('$WORKSPACE'),
  \ },
\ }

Usage

  1. Open a java source file in a Maven project (vim-lsp-java needs a pom.xml file).

  2. Enjoy!

License

MIT