aboutsummaryrefslogtreecommitdiffstats
path: root/rplugin/python3/deoplete/sources
diff options
context:
space:
mode:
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()