New deoplete source interface

This commit is contained in:
Shougo Matsushita 2015-06-12 21:19:24 +09:00
parent bc46bd4be6
commit b52dcbcd5f
1 changed files with 8 additions and 1 deletions

View File

@ -27,6 +27,7 @@ import re
class Source(object):
def __init__(self):
self.mark = '[nsnip]'
self.filters = ['matcher_fuzzy']
pass
@ -38,4 +39,10 @@ class Source(object):
return -1
def gather_candidates(self, vim, context):
return vim.eval("map(values(neosnippet#helpers#get_snippets()), 'v:val.word')")
return vim.eval("values(neosnippet#helpers#get_snippets())")
def on_post_filter(self, vim, context):
for candidate in context['candidates']:
candidate['dup'] = 1
return context['candidates']