diff options
-rw-r--r-- | autoload/deoplete/handler.vim | 6 | ||||
-rw-r--r-- | autoload/deoplete/init.vim | 2 | ||||
-rw-r--r-- | doc/deoplete.txt | 10 |
3 files changed, 17 insertions, 1 deletions
diff --git a/autoload/deoplete/handler.vim b/autoload/deoplete/handler.vim index 402e235..a73ef87 100644 --- a/autoload/deoplete/handler.vim +++ b/autoload/deoplete/handler.vim @@ -123,8 +123,12 @@ function! s:is_skip_text(event) abort "{{{ endif endif + let skip_chars = deoplete#util#get_simple_buffer_config( + \ 'b:deoplete_skip_chars', 'g:deoplete#skip_chars') + return (!pumvisible() && virtcol('.') != displaywidth) - \ || (a:event !=# 'Manual' && input =~ '[})>\]]$') + \ || (a:event !=# 'Manual' && input != '' + \ && index(skip_chars, input[-1:]) >= 0) endfunction"}}} function! s:on_event(event) abort "{{{ diff --git a/autoload/deoplete/init.vim b/autoload/deoplete/init.vim index fe84f23..062d5f0 100644 --- a/autoload/deoplete/init.vim +++ b/autoload/deoplete/init.vim @@ -112,6 +112,8 @@ function! deoplete#init#_variables() abort "{{{ \ 'g:deoplete#max_abbr_width', 80) call deoplete#util#set_default( \ 'g:deoplete#max_menu_width', 40) + call deoplete#util#set_default( + \ 'g:deoplete#skip_chars', []) call deoplete#util#set_default( \ 'g:deoplete#keyword_patterns', {}) diff --git a/doc/deoplete.txt b/doc/deoplete.txt index 51fd759..86c548a 100644 --- a/doc/deoplete.txt +++ b/doc/deoplete.txt @@ -195,6 +195,16 @@ g:deoplete#auto_refresh_delay Default value: 50 + *g:deoplete#skip_chars* +g:deoplete#skip_chars + The list of skip characters in the auto completion. + + Default value: [] + + *b:deoplete_skip_chars* +b:deoplete_skip_chars + Buffer local variable of |g:deoplete#skip_chars|. + *g:deoplete#keyword_patterns* g:deoplete#keyword_patterns This dictionary records keyword patterns to buffer completion. |