Language Server Protocol support for neovim.
More recordings at https://github.com/autozimu/images/tree/master/LanguageClient-neovim.
- Non-blocking asynchronous calls.
- Sensible completion. Integrated with deoplete or nvim-completion-manager.
- Realtime diagnostics/compiler/lint message.
- Rename.
- Get identifer info.
- Goto definition.
- Goto reference locations.
- Workspace/Document symbols query.
(Note: Most of the functionality are provided by language servers. Specific language servers may implement only a subset of the features, see http://langserver.org, in which case, featured listed above may not fully functional.)
Using vim-plug
:
Plug 'autozimu/LanguageClient-neovim', { 'do': ':UpdateRemotePlugins' } " (Optional) Multi-entry selection UI. Plug 'junegunn/fzf' " (Optional) Multi-entry selection UI. Plug 'Shougo/denite.nvim' " (Optional) Completion integration with deoplete. Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } " (Optional) Completion integration with nvim-completion-manager. Plug 'roxma/nvim-completion-manager' " (Optional) Showing function signature and inline doc. Plug 'Shougo/echodoc.vim'
Example configuration
" Required for operations modifying multiple buffers like rename. set hidden let g:LanguageClient_serverCommands = { \ 'rust': ['cargo', 'run', '--release', '--manifest-path=/opt/rls/Cargo.toml'], \ } nnoremap <silent> K :call LanguageClient_textDocument_hover()<CR> nnoremap <silent> gd :call LanguageClient_textDocument_definition()<CR> nnoremap <silent> <F2> :call LanguageClient_textDocument_rename()<CR>
Run command LanguageClientStart
inside neovim to get start.
Please see http://langserver.org.