Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preview to completions #1

Open
FichteFoll opened this issue Jan 10, 2013 · 5 comments
Open

Add preview to completions #1

FichteFoll opened this issue Jan 10, 2013 · 5 comments

Comments

@FichteFoll
Copy link

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.

@eliquious
Copy link
Owner

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.

@FichteFoll
Copy link
Author

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.

@eliquious
Copy link
Owner

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

@FichteFoll
Copy link
Author

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.

@gerardroche
Copy link

The descriptions cause buffer completions to be blocked. ST issue is here sublimehq/sublime_text#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 added a commit to gerardroche/Python-Auto-Complete that referenced this issue Nov 20, 2017
This fixes completions so that they are not affected by this bug:

sublimehq/sublime_text#1061

Completions triggers that contain any character not in [a-zA-Z0-9_-]
cause buffers completions to block i.e. buffer completions don't work
properly.

Trigger descriptions use '\t' character to separate the completion from
the trigger, which means they break buffer completions.

There were a few other ones that had parens in the trigger too.

Re: eliquious#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants