Created
January 15, 2018 18:42
-
-
Save copy/0ada90677b950de3c2273b874a3265ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from .base import Base | |
import deoplete.util | |
import re | |
import time | |
class Source(Base): | |
def __init__(self, vim): | |
Base.__init__(self, vim) | |
self.name = 'test' | |
self.input_pattern = r'.*' | |
self.get_complete_position_re = re.compile(r"\w*$") | |
def get_complete_position(self, context): | |
m = re.search(r"\w*$", context["input"]) | |
return m.start() if m else None | |
def gather_candidates(self, context): | |
time.sleep(0.1) | |
return [ | |
{ "word": "True" }, | |
{ "word": "False" }, | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment