30 releases
0.1.161 | Dec 10, 2020 |
---|---|
0.1.160 | Oct 24, 2020 |
0.1.158 | Jul 5, 2020 |
0.1.156 | Jan 7, 2020 |
0.1.131 | Nov 24, 2018 |
#87 in Text editors
3,470 stars & 41 watchers
400KB
10K
SLoC
For legacy python implementation, see branch master.
LanguageClient-neovim
Language Server Protocol support for vim and neovim.
More recordings at Updates, screenshots & GIFs.
Features
- Non-blocking asynchronous calls.
- Sensible completion.
Integrated well with deoplete or
ncm2, or MUcomplete.
Or simply with vim built-in
omnifunc
. - Realtime diagnostics/compiler/lint message.
- Rename.
- Hover/Get identifier info.
- Goto definition.
- Goto reference locations.
- Workspace/Document symbols query.
- Formatting.
- Code Action/Quick Fix.
Quick Start
Using vim-plug
:
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
" (Optional) Multi-entry selection UI.
Plug 'junegunn/fzf'
Example configuration
" Required for operations modifying multiple buffers like rename.
set hidden
let g:LanguageClient_serverCommands = {
\ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'],
\ 'javascript': ['/usr/local/bin/javascript-typescript-stdio'],
\ 'javascript.jsx': ['tcp://127.0.0.1:2089'],
\ 'python': ['/usr/local/bin/pyls'],
\ 'ruby': ['~/.rbenv/shims/solargraph', 'stdio'],
\ }
" note that if you are using Plug mapping you should not use `noremap` mappings.
nmap <F5> <Plug>(lcn-menu)
" Or map each action separately
nmap <silent>K <Plug>(lcn-hover)
nmap <silent> gd <Plug>(lcn-definition)
nmap <silent> <F2> <Plug>(lcn-rename)
Run command nvim +PlugInstall +UpdateRemotePlugins +qa
in shell to install
this plugin. Install corresponding language servers. Restart neovim/vim and
language services will be available right away. Happy hacking!
Mappings
LanguageClient-neovim defines various Plug mappings, see :help LanguageClientMappings
for a full
list and an example configuration.
Install
Language Servers
Note, you will also need language server(s) to take advantages of this plugin. To find list of language server implementations and how to install them, please see http://langserver.org and/or https://microsoft.github.io/language-server-protocol/implementors/servers/.
Documentation
Dependencies
~10–20MB
~264K SLoC