Python-Auto-Complete icon indicating copy to clipboard operation
Python-Auto-Complete copied to clipboard

Add preview to completions

Open FichteFoll opened this issue 13 years ago • 5 comments

Using \t in the completion string the following text will be displayed as a description right-aligned in the completion popup (example, using the API). I tested it using

{"trigger":"abs\tabs(...)", "contents": "abs(${1:x})"}

and it worked really well.

The reason why I consider this to be really useful is that this way you can easily see which completions come from packages/plugins and which are from the current file and added by ST.

FichteFoll avatar Jan 10 '13 20:01 FichteFoll

Thanks for the comment. I've started a new completions package since this one was written. Now that I know someone is using it I'll go back and add some to it. Although, you may find my new one more helpful. You can find it in my 'livecode.py' repo.

eliquious avatar Jan 10 '13 22:01 eliquious

I just found it via Twitter and thought "well, this thing provides tooltips for important keywords, why not?". I'll look into that new thing of yours.

FichteFoll avatar Jan 11 '13 14:01 FichteFoll

I added the descriptions for most of the completions. Once you update let me know what you think.

eliquious avatar Mar 06 '13 18:03 eliquious

Thanks. From looking at the source I'd rather like having either "abs\tfunction" or "abs\tabs(...)" instead of just the same thing. And it seems you didn't update the modules.

FichteFoll avatar Mar 06 '13 22:03 FichteFoll

The descriptions cause buffer completions to be blocked. ST issue is here https://github.com/SublimeTextIssues/Core/issues/1061. Perhaps the issue doesn't explain the bug well enough, it's a pretty major bug IMO.

What it means is anybody who installs completions that have descriptions in them are affected by that bug, buffer completions disappear. It's a really bad bug.

gerardroche avatar Nov 19 '17 10:11 gerardroche