Obviously you need neovim or vim!
Run following command to install neovim python plugin host:
sudo pip3 install --upgrade neovim
Note: Already included in Python version 3.6.0 and later.
Run following command to install typing
module:
sudo pip3 install --upgrade typing
For vim, two other plugins are necessary to make this one work (I'm sorry, but vim support is a second thought.)
Also, following :UpdateRemotePlugins
commands is not needed for vim users.
Choose steps matching your plugin manager.
vim-plug user
Add following to vimrc
Plug 'autozimu/LanguageClient-neovim', { 'do': ':UpdateRemotePlugins' }
Restart neovim and run :PlugInstall
.
Vundle user
Add following to vimrc
Plugin 'autozimu/LanguageClient-neovim'
Restart neovim and run :PluginInstall
.
When using Vundle you need to run :UpdateRemotePlugins
command manually
after you install/update the plugin.
dein.vim user
call dein#add('autozimu/LanguageClient-neovim')
Restart neovim and run :call dein#install()
.
Clone this repo into some place and add the folder into neovim runtimepath.
Run :UpdateRemotePlugins
in neovim and restart.
At this point, your ~/.local/share/nvim/rplugin.vim
should contains
information about this plugin. If not, see following troubleshooting.
Install language servers if corresponding language servers are not available yet on your system. Please see http://langserver.org and/or https://github.com/Microsoft/language-server-protocol/wiki/Protocol-Implementations for list of language servers.
Example configuration
" Required for operations modifying multiple buffers like rename.
set hidden
let g:LanguageClient_serverCommands = {
\ 'rust': ['rustup', 'run', 'nightly', 'rls'],
\ 'javascript': ['/opt/javascript-typescript-langserver/lib/language-server-stdio.js'],
\ }
" Automatically start language servers.
let g:LanguageClient_autoStart = 1
nnoremap <silent> K :call LanguageClient_textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient_textDocument_definition()<CR>
nnoremap <silent> <F2> :call LanguageClient_textDocument_rename()<CR>
- Begin with something small.
- Backup your init.vim and use min-init.vim as init.vim, run
nvim +PlugInstall +UpdateRemotePlugins +qa
command in shell. - Try with sample projects.
- Backup your init.vim and use min-init.vim as init.vim, run
- Run
:CheckHealth
to see if there is issue with neovim python3 host. then start neovim normally. - Run
:echo &runtimepath
and make sure the plugin path is in the list. - Make sure language server run properly when invoked manually from shell.
Q: Single 'd' deletes a line #132
A: This is a bug relates to timer in neovim version <= 0.2. Please upgrade to neovim 0.2.1 or above.