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

Allow delaying param completion to when parenthesis is opened #36

Closed
patrys opened this issue May 7, 2013 · 11 comments
Closed

Allow delaying param completion to when parenthesis is opened #36

patrys opened this issue May 7, 2013 · 11 comments

Comments

@patrys
Copy link

patrys commented May 7, 2013

Currently auto-completion kicks in as soon as you select a method name. It's somewhat inconvenient if you pass functions as parameters and will be even more inconvenient if classes start auto-completing their __init__ params.

@srusskih
Copy link
Owner

srusskih commented May 7, 2013

Do you mean this:

import os

def method(some):
    pass

method(os.<caret>)

When completion triggered (f.e. after "dot"), we should see os module methods plus params, in completion popup, correct?

@patrys
Copy link
Author

patrys commented May 7, 2013

I mean not completing function parameters until the user explicitly opens the parenthesis:

def method(some, params, here):
    pass

met<caret>
  ↓ <accept suggestion>
method<caret>
  ↓ <input '('>
method(<caret>some, params, here)

@srusskih
Copy link
Owner

srusskih commented May 7, 2013

Thank. That's interesting idea

@srusskih
Copy link
Owner

Changes pushed to master

@patrys
Copy link
Author

patrys commented May 14, 2013

Seems to work great. Any chance to get the same completion for classes now? (ticket #35)

@srusskih
Copy link
Owner

class A:
    def __init__(self, a, b='b', *args):
        pass

Then a bit below:

A<caret>

input (

A(a=<caret>, b='b')

Dose not works for You?

@patrys
Copy link
Author

patrys commented May 14, 2013

I have to confess that I've only tried with imported classes and that does not seem to work.

@srusskih
Copy link
Owner

Work for this case.

from string import Template

Template(template=)

My settings (User/sublime_jedi.sublime_settings) on ST2

{
    "auto_complete_function_params": "all"
}

@srusskih
Copy link
Owner

Could you share your case, to reproduce?

@patrys
Copy link
Author

patrys commented May 15, 2013

Sorry, it works now, I've found a separate problem and will file it in a minute. Feel free to close this and #35.

@srusskih
Copy link
Owner

Great

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

2 participants