This is short instructions for how to integrate your Vim editor with Camel LSP server.
This instruction requires the following plugins:
It assumes those plugins below are already installed in ~/.vimrc
:
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Here we use vim-plug but you can use a plugin manager of your choice: pathogen.vim, Vundle, NeoBundle, dein.vim, etc.
mkdir -p ~/lsp/camel-lsp-server
cd ~/lsp/camel-lsp-server
curl -L https://repo1.maven.org/maven2/com/github/camel-tooling/camel-lsp-server/1.8.0/camel-lsp-server-1.8.0.jar -O
Add following to ~/.vimrc
:
if executable('java') && filereadable(expand('~/lsp/camel-lsp-server/camel-lsp-server-1.8.0.jar'))
au User lsp_setup call lsp#register_server({
\ 'name': 'camel',
\ 'cmd': {server_info->[
\ 'java',
\ '-jar',
\ expand('~/lsp/camel-lsp-server/camel-lsp-server-1.8.0.jar')
\ ]},
\ 'whitelist': ['java', 'xml', 'yaml']
\ })
endif