Skip to content
Piping edited this page Jul 29, 2018 · 10 revisions

Welcome to the LanguageClient-neovim wiki!

Right side has a list of configurable components.
To enable the language client IDE features in vim, you need

  1. a language server for your language.
  2. various vim plugins like code completion plugin and key mappings for different functionalities.

Before using of LanguageClient, it is necessary to specify commands that are going to be used to start language server. See |LanguageClient_serverCommands| for detail. Here is a simple example config: >

let g:LanguageClient_serverCommands = {
    \ 'rust': ['rustup', 'run', 'nightly', 'rls'],
    \ }

After that, open a file with one of the above filetypes, functionalities provided by language servers should be available out of the box.

At this point, call any provided function as you like. See |LanguageClientFunctions| for a complete list of functions. Usually one would like to map these functions to shortcuts, for example: >

nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
Clone this wiki locally