Browse Source

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

Ignore rust self argument when completing methods
PR/fix-warning
Shougo 6 years ago
committed by GitHub
parent
commit
7cfb9aa4a4
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      autoload/neosnippet/parser.vim

+ 3
- 1
autoload/neosnippet/parser.vim 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


Loading…
Cancel
Save