aboutsummaryrefslogtreecommitdiffstats
path: root/rplugin/python3/deoplete/sources
diff options
context:
space:
mode:
authorJason Chu2017-01-19 05:31:07 +0000
committerJason Chu2017-01-19 05:31:07 +0000
commitcbc17ade54ac18edc057fb52eb0120329cc24c4d (patch)
tree68932828ef959835b4350e8c31d96f9fec2ba121 /rplugin/python3/deoplete/sources
parentd337960f109ec6f53fb0d449a6e0d10c690d2b30 (diff)
downloadvim-beancount-cbc17ade54ac18edc057fb52eb0120329cc24c4d.tar.gz
Change return value of gather_candidates because str's aren't valid anymore
See https://github.com/Shougo/deoplete.nvim/issues/421 and https://github.com/Shougo/deoplete.nvim/issues/419
Diffstat (limited to '')
-rw-r--r--rplugin/python3/deoplete/sources/beancount.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/rplugin/python3/deoplete/sources/beancount.py b/rplugin/python3/deoplete/sources/beancount.py
index f595a54..c21c057 100644
--- a/rplugin/python3/deoplete/sources/beancount.py
+++ b/rplugin/python3/deoplete/sources/beancount.py
@@ -36,17 +36,17 @@ class Source(Base):
def gather_candidates(self, context):
if re.match(r'^\d{4}[/-]\d\d[/-]\d\d \w*$', context['input']):
- return DIRECTIVES
+ return [{'word': x, 'kind': 'directive'} for x in DIRECTIVES]
if not context['complete_str']:
return []
first = context['complete_str'][0]
if first == '#':
- return ['#' + w for w in self._tags]
+ return [{'word': '#' + w, 'kind': 'tag'} for w in self._tags]
elif first == '^':
- return ['^' + w for w in self._links]
+ return [{'word': '^' + w, 'kind': 'link'} for w in self._links]
elif first == '"':
- return ['"{}"'.format(w) for w in self._payees]
- return self._accounts
+ return [{'word': '"{}"'.format(w), 'kind': 'payee'} for w in self._payees]
+ return [{'word': x, 'kind': 'account'} for x in self._accounts]
def __make_cache(self, context):
accounts = set()