1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 22:30:04 +08:00

pref(bundle): update bundle deoplete-lsp

This commit is contained in:
wsdjeg 2022-04-23 12:17:59 +08:00
parent b730079c88
commit aebdaebb37
3 changed files with 14 additions and 11 deletions

View File

@ -19,7 +19,7 @@ In `bundle/` directory, there are two kinds of plugins: forked plugins without c
- [dein.vim](https://github.com/Shougo/dein.vim/tree/772ae08cef5e712b2b31b4aaee908fc853accd94)
- [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim/tree/17a83ea765831cb0cc64f768b8c3f43479b90bbe)
- [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/tree/507f8a570ac2b8b8dabdd0f62da3b3194bf822f8)
- [deoplete-lsp](https://github.com/deoplete-plugins/deoplete-lsp/tree/6299a22bedfb4f814d95cb0010291501472f8fd0)
- [deoplete-lsp](https://github.com/deoplete-plugins/deoplete-lsp/tree/c466c955e85d995984a8135e16da71463712e5e5)
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp/tree/3192a0c57837c1ec5bf298e4f3ec984c7d2d60c0)
- [coc-neosnippet](https://github.com/notomo/cmp-neosnippet/tree/2d14526af3f02dcea738b4cea520e6ce55c09979)
- [deoplete](https://github.com/Shougo/deoplete.nvim/tree/1c40f648d2b00e70beb4c473b7c0e32b633bd9ae)

View File

@ -7,9 +7,9 @@
local api = vim.api
local get_candidates = function(_, arg1, arg2)
-- For neovim 0.6 breaking changes
-- For neovim 0.5.1/0.6 breaking changes
-- https://github.com/neovim/neovim/pull/15504
local result = (vim.fn.has('nvim-0.6') == 1
local result = ((vim.fn.has('nvim-0.6') == 1 or vim.fn.has('nvim-0.5.1'))
and type(arg1) == 'table' and arg1 or arg2)
if not result or result == 0 then
return

View File

@ -100,15 +100,18 @@ class Source(Base):
vars['deoplete#source#lsp#_complete_position'] = context[
'complete_position']
params = self.vim.call(
'luaeval',
'vim.lsp.util.make_position_params()')
self.vim.call(
'luaeval', 'require("candidates").request_candidates('
'_A.arguments)',
{'arguments': params})
# Note: request_candidates() may be failed
try:
params = self.vim.call(
'luaeval',
'vim.lsp.util.make_position_params()')
self.vim.call(
'luaeval', 'require("candidates").request_candidates('
'_A.arguments)',
{'arguments': params})
except Exception:
pass
return []
def process_candidates(self):