Merge pull request #391 from TylerHorth/ignore-rust-self

Ignore rust self argument when completing methods
This commit is contained in:
Shougo 2017-06-24 15:37:12 +09:00 committed by GitHub
commit 7cfb9aa4a4

View File

@ -357,7 +357,9 @@ function! neosnippet#parser#_get_completed_snippet(completed_item, cur_text, nex
\ neosnippet#parser#_get_in_paren(key, pair, abbr),
\ key.'\zs.\{-}\ze'.pair . '\|<\zs.\{-}\ze>', '', 'g'),
\ '[^[]\zs\s*,\s*')
if key ==# '(' && arg ==# 'self' && &filetype ==# 'python'
if key ==# '(' && (
\ (&filetype ==# 'python' && arg ==# 'self') ||
\ (&filetype ==# 'rust' && arg =~# '\m^&\?\(mut \)\?self$'))
" Ignore self argument
continue
endif