mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 05:30:07 +08:00
Add vim8 support
This commit is contained in:
parent
20ed67388e
commit
a9c7ebce71
@ -2,8 +2,11 @@ function! SpaceVim#layers#lsp#plugins() abort
|
||||
let plugins = []
|
||||
|
||||
if has('nvim')
|
||||
let plugins = add(plugins, ['SpaceVim/LanguageClient-neovim',
|
||||
call add(plugins, ['SpaceVim/LanguageClient-neovim',
|
||||
\ { 'merged': 0, 'if': has('python3') }])
|
||||
else
|
||||
call add(plugins, ['prabirshrestha/async.vim', {'merged' : 0}])
|
||||
call add(plugins, ['prabirshrestha/vim-lsp', {'merged' : 0}])
|
||||
endif
|
||||
|
||||
return plugins
|
||||
|
@ -1,22 +1,51 @@
|
||||
"=============================================================================
|
||||
" lsp.vim --- language server protocol wallpaper
|
||||
" Copyright (c) 2016-2017 Shidong Wang & Contributors
|
||||
" Author: Seong Yong-ju < @sei40kr >
|
||||
" URL: https://spacevim.org
|
||||
" License: MIT license
|
||||
"=============================================================================
|
||||
scriptencoding utf-8
|
||||
|
||||
" lsp.vim
|
||||
" author: Seong Yong-ju ( @sei40kr )
|
||||
if has('nvim')
|
||||
" use LanguageClient-neovim
|
||||
function! SpaceVim#lsp#reg_server(ft, cmds) abort
|
||||
let g:LanguageClient_serverCommands[a:ft] = copy(a:cmds)
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#lsp#reg_server(ft, cmds) abort
|
||||
let g:LanguageClient_serverCommands[a:ft] = copy(a:cmds)
|
||||
endfunction
|
||||
function! SpaceVim#lsp#show_doc() abort
|
||||
call LanguageClient_textDocument_hover()
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#lsp#show_doc() abort
|
||||
call LanguageClient_textDocument_hover()
|
||||
endfunction
|
||||
function! SpaceVim#lsp#go_to_def() abort
|
||||
call LanguageClient_textDocument_definition()
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#lsp#go_to_def() abort
|
||||
call LanguageClient_textDocument_definition()
|
||||
endfunction
|
||||
function! SpaceVim#lsp#rename() abort
|
||||
call LanguageClient_textDocument_rename()
|
||||
endfunction
|
||||
else
|
||||
" use vim-lsp
|
||||
function! SpaceVim#lsp#reg_server(ft, cmds) abort
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'LSP',
|
||||
\ 'cmd': {server_info -> a:cmds},
|
||||
\ 'whitelist': [ a:ft ],
|
||||
\ })
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#lsp#rename() abort
|
||||
call LanguageClient_textDocument_rename()
|
||||
endfunction
|
||||
function! SpaceVim#lsp#show_doc() abort
|
||||
LspHover
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#lsp#go_to_def() abort
|
||||
LspDefinition
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#lsp#rename() abort
|
||||
LspRename
|
||||
endfunction
|
||||
|
||||
endif
|
||||
|
||||
" vi: et sw=2 cc=80
|
||||
|
Loading…
Reference in New Issue
Block a user