Format autocomplete in more modern way, without much effort
I didn't like the fact it had a lot of text in an entry, which at the same time didn't give quick feedback to user about what the completion is about.
So I started playing around with code, to improve this, and I got to this point:

I wanted to create a pull request, but the changes are done to the version that's different from master. Also that's probably one of my first Python lines in my life.
Here I attach format_competions_by_language function:
def format_completions_by_language(cplns, language, text_in_current_line, trigger):
function = None if 'import ' in text_in_current_line else 'function'
def get_symbol(t):
symbols = {
'variable': '🅥',
'constant': '🅓',
'namespace': '🅝',
'keyword': '🅚',
'function': '🅕',
'class': '🅒',
'interface': '🅘',
}
if language == "PHP" and trigger and (trigger.name == "php-complete-object-members" or trigger.name == "php-complete-static-members"):
symbols['variable'] = '🅟'
symbols['function'] = '🅜'
return symbols[t] if t in symbols else t
def get_name(t, n):
if t == 'variable' and language == 'PHP':
return '$'+n
elif t == 'function':
return n+'(…)'
return n
return [('%s %s' % (get_symbol(t), get_name(t, n,)), (n).replace("$", "") + ('($0)' if t == function else '')) for t, n in cplns]
Feel free to use this code and I'll be happy if it gets implemented into master
How to make Sublime show the symbols like in the gif?
🅥 is not working...
@Kronuz Any plans for something like this?
@natanfelles I believe it's either the fact your system misses a font that supports this kind of characters, or it may be becasue sublime text version is below 3146
Yes. I thought it could be the FiraCode font, but even switching to it these special characters do not appear.
Tried to inject an image, but no success yet.
ST version: 3176