Ⅰ. 插件描述
deoplete source for vim-lspⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'lighttiger2505/deoplete-vim-lsp'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'lighttiger2505/deoplete-vim-lsp'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'lighttiger2505/deoplete-vim-lsp'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/lighttiger2505/deoplete-vim-lsp
Ⅳ. 文档说明
# deoplete-vim-lsp
deoplete source for vim-lsp
Warning
Old style sources like the old deoplete-vim-lsp have been deprecated.
So the latest deoplete-vim-lsp will only work with the latest deoplete.nvim
Please update deoplete-vim-lsp.
See commit
Install
requirements
.vimrc
For vim-plug
Plug 'Shougo/deoplete.nvim'
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'lighttiger2505/deoplete-vim-lsp'For dein.vim
call dein#add('Shougo/deoplete.nvim')
call dein#add('prabirshrestha/async.vim')
call dein#add('prabirshrestha/vim-lsp')
call dein#add('lighttiger2505/deoplete-vim-lsp')setting example
let g:deoplete#enable_at_startup = 1
" For python language server
if (executable('pyls'))
let s:pyls_path = fnamemodify(g:python_host_prog, ':h') . '/'. 'pyls'
augroup LspPython
autocmd!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'whitelist': ['python']
\ })
augroup END
endif
" For bingo(go language server)
if (executable('bingo'))
augroup LspGo
autocmd!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'go-lang',
\ 'cmd': {server_info->['bingo', '-disable-func-snippet', '-mode', 'stdio']},
\ 'whitelist': ['go'],
\ })
augroup END
endif