Support new source interface
This commit is contained in:
parent
f1980468b0
commit
5faebdef65
@ -27,16 +27,16 @@ import re
|
|||||||
from .base import Base
|
from .base import Base
|
||||||
|
|
||||||
class Source(Base):
|
class Source(Base):
|
||||||
def __init__(self):
|
def __init__(self, vim):
|
||||||
Base.__init__(self)
|
Base.__init__(self, vim)
|
||||||
|
|
||||||
self.name = 'vimshell'
|
self.name = 'neosnippet'
|
||||||
self.mark = '[nsnip]'
|
self.mark = '[nsnip]'
|
||||||
|
|
||||||
def gather_candidates(self, vim, context):
|
def gather_candidates(self, context):
|
||||||
return vim.eval('values(neosnippet#helpers#get_snippets())')
|
return self.vim.eval('values(neosnippet#helpers#get_snippets())')
|
||||||
|
|
||||||
def on_post_filter(self, vim, context):
|
def on_post_filter(self, context):
|
||||||
for candidate in context['candidates']:
|
for candidate in context['candidates']:
|
||||||
candidate['dup'] = 1
|
candidate['dup'] = 1
|
||||||
return context['candidates']
|
return context['candidates']
|
||||||
|
Loading…
Reference in New Issue
Block a user