1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 00:10:07 +08:00

Fix lsp support for lang#c layer (#3652)

This commit is contained in:
Wang Shidong 2020-07-19 22:33:15 +08:00 committed by GitHub
parent bfd221d9c8
commit bea44f4b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,6 +103,14 @@ elseif has('nvim')
call LanguageClient_textDocument_definition()
endfunction
function! SpaceVim#lsp#go_to_typedef() abort
call LanguageClient_textDocument_typeDefinition()
endfunction
function! SpaceVim#lsp#go_to_impl() abort
call LanguageClient_textDocument_implementation()
endfunction
function! SpaceVim#lsp#rename() abort
call LanguageClient_textDocument_rename()
endfunction
@ -110,6 +118,18 @@ elseif has('nvim')
function! SpaceVim#lsp#references() abort
call LanguageClient_textDocument_references()
endfunction
function! SpaceVim#lsp#go_to_declaration() abort
call LanguageClient_textDocument_declaration()
endfunction
function! SpaceVim#lsp#documentSymbol()
call LanguageClient_textDocument_documentSymbol()
endfunction
function! SpaceVim#lsp#refactor() abort
" @todo languageclient do not support refactor
endfunction
else
" use vim-lsp
function! SpaceVim#lsp#reg_server(ft, cmds) abort