From d97f7dd84f8a06e66d424616e750706ba7248b5c Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Sat, 30 Jan 2021 15:49:55 +0900 Subject: [PATCH] Stop working with nvim-compe --- autoload/vsnip_integ.vim | 7 +++++++ autoload/vsnip_integ/detection.vim | 1 + 2 files changed, 8 insertions(+) diff --git a/autoload/vsnip_integ.vim b/autoload/vsnip_integ.vim index e701410..78ce656 100644 --- a/autoload/vsnip_integ.vim +++ b/autoload/vsnip_integ.vim @@ -78,6 +78,13 @@ function! vsnip_integ#on_complete_done(completed_item) abort endif endif + " disable `on_complete_done` for nvim-compe. + if index(l:context.sources, 'compe') >= 0 + if vsnip_integ#detection#exists('compe') + return + endif + endif + if s:stop_complete_done | return | endif let s:stop_complete_done = v:true call timer_start(0, { -> execute('let s:stop_complete_done = v:false') }) diff --git a/autoload/vsnip_integ/detection.vim b/autoload/vsnip_integ/detection.vim index bd88b5e..a2d72a0 100644 --- a/autoload/vsnip_integ/detection.vim +++ b/autoload/vsnip_integ/detection.vim @@ -8,6 +8,7 @@ let s:definition = { \ 'mucomplete': { -> exists('g:loaded_mucomplete') }, \ 'deoplete_lsp': { -> s:runtimepath('lua/deoplete.lua') }, \ 'completion_nvim': { -> exists('g:loaded_completion') }, +\ 'compe': { -> exists('g:loaded_compe') }, \ } let s:cache = {}