From 6f7960a888e6b0a55c02662575ab361dde5d6da0 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Thu, 28 Apr 2022 22:00:57 +0800 Subject: [PATCH] fix(lsp): fix unknown function in nvim 0.4.3 --- autoload/SpaceVim/lsp.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autoload/SpaceVim/lsp.vim b/autoload/SpaceVim/lsp.vim index eafa222d3..7dcf2b575 100644 --- a/autoload/SpaceVim/lsp.vim +++ b/autoload/SpaceVim/lsp.vim @@ -84,6 +84,8 @@ elseif SpaceVim#layers#isLoaded('autocomplete') && get(g:, 'spacevim_autocomplet call SpaceVim#logger#info('lsp client: coc.nvim') let s:coc_language_servers = {} let s:coc_language_servers_key_id_map = {} + function! SpaceVim#lsp#buf_server_ready() abort + endfunction function! SpaceVim#lsp#reg_server(ft, cmds) abort " coc.nvim doesn't support key values containing dots " See https://github.com/neoclide/coc.nvim/issues/323 @@ -162,6 +164,8 @@ elseif SpaceVim#layers#isLoaded('autocomplete') && get(g:, 'spacevim_autocomplet endfunction elseif has('nvim-0.4.3') && $ENABLE_NVIM043LSP call SpaceVim#logger#info('lsp client: nvim-lspext') + function! SpaceVim#lsp#buf_server_ready() abort + endfunction function! SpaceVim#lsp#show_doc() abort lua require('lsp.plugin') \ .client.request('textDocument/hover', @@ -242,6 +246,8 @@ elseif has('nvim') function! SpaceVim#lsp#refactor() abort " @todo languageclient do not support refactor endfunction + function! SpaceVim#lsp#buf_server_ready() abort + endfunction else " use vim-lsp call SpaceVim#logger#info('lsp client: vim-lsp')