diff --git a/autoload/easycomplete.vim b/autoload/easycomplete.vim index a47d22b..6eaa0c0 100644 --- a/autoload/easycomplete.vim +++ b/autoload/easycomplete.vim @@ -2021,15 +2021,7 @@ function! easycomplete#SnipSupports() endfunction function! s:SnipSupports() - if !has("python3") - return v:false - endif - try - call funcref("UltiSnips#SnippetsInCurrentScope") - catch /700/ - return v:false - endtry - return v:true + return g:easycomplete_snips_enable ? v:true : v:false endfunction function! s:SnippetsInit() diff --git a/plugin/easycomplete.vim b/plugin/easycomplete.vim index 36d16a7..46af000 100644 --- a/plugin/easycomplete.vim +++ b/plugin/easycomplete.vim @@ -123,6 +123,9 @@ endif if !exists("g:easycomplete_tabnine_config") let g:easycomplete_tabnine_config = {} endif +if !exists("g:easycomplete_snips_enable") + let g:easycomplete_snips_enable = has('python3') && exists('*UltiSnips#SnippetsInCurrentScope') +endif if !exists("g:easycomplete_filetypes") let g:easycomplete_filetypes = {"r": { \ "whitelist": []