summaryrefslogtreecommitdiff
path: root/autoload/deoplete.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/deoplete.vim')
-rw-r--r--autoload/deoplete.vim19
1 files changed, 14 insertions, 5 deletions
diff --git a/autoload/deoplete.vim b/autoload/deoplete.vim
index ec01c42..5cd5ea8 100644
--- a/autoload/deoplete.vim
+++ b/autoload/deoplete.vim
@@ -5,14 +5,23 @@
"=============================================================================
function! deoplete#initialize() abort "{{{
- return deoplete#init#enable()
+ return deoplete#init#_initialize()
+endfunction"}}}
+function! deoplete#enable() abort "{{{
+ call deoplete#init#_initialize()
+ return deoplete#init#_enable()
+endfunction"}}}
+function! deoplete#disable() abort "{{{
+ return deoplete#init#_disable()
+endfunction"}}}
+function! deoplete#toggle() abort "{{{
+ return deoplete#init#_is_enabled() ?
+ \ deoplete#disable() : deoplete#enable()
endfunction"}}}
function! deoplete#enable_logging(level, logfile) abort "{{{
- if !deoplete#init#is_enabled()
- " Enable to allow logging before completions start.
- call deoplete#init#enable()
- endif
+ " Enable to allow logging before completions start.
+ call deoplete#init#_initialize()
call rpcrequest(g:deoplete#_channel_id,
\ 'deoplete_enable_logging', a:level, a:logfile)