diff --git a/kate_plugins/autopate.py b/kate_plugins/autopate.py index 589cc62..71e2552 100644 --- a/kate_plugins/autopate.py +++ b/kate_plugins/autopate.py @@ -47,21 +47,23 @@ def __init__(self, model, resultList=None): } @classmethod - def createItemAutoComplete(cls, text, icon='unknown', args=None, description=None): + def createItemAutoComplete(cls, text, category='unknown', args=None, description=None): icon_converter = {'package': 'code-block', 'module': 'code-context', 'unknown': 'unknown', 'constant': 'code-variable', 'class': 'code-class', - 'function': 'code-function'} + 'function': 'code-function', + 'pointer': 'unknown'} max_description = 50 if description and len(description) > max_description: description = description.strip() description = '%s...' % description[:max_description] return {'text': text, - 'icon': icon_converter[icon], + 'icon': icon_converter[category], + 'category': category, 'args': args or '', - 'type': icon, + 'type': category, 'description': description or ''} def completionInvoked(self, view, word, invocationType): @@ -184,4 +186,4 @@ def getChildrenInJSON(self, keys, json): if keys_split and keys_split[0] in json: keys = self.SEPARATOR.join(keys_split[1:]) return self.getChildrenInJSON(keys, json[keys_split[0]].get('children', None)) - return None \ No newline at end of file + return None