srusskih / SublimeJEDI

awesome Python autocompletion with SublimeText
MIT License
938 stars 109 forks source link

`auto_complete_function_params` malfunctioning #282

Closed kkew3 closed 5 years ago

kkew3 commented 5 years ago

I set auto_complete_function_params to "required" as suggested by README. However, it behaves the same as "all", i.e. giving a full long list of parameters and keyword parameters. Setting it to "" stops jedi from suggesting the parameter list. However, for example, if I define a function:

def f(xxxxxxxx,y):
    return xxxxxxxx+y

and if I continue to define a function g which functions the same as lambda x: f(x, 3) (denoting caret position as _):

def g(xxxxxxxx):
    return f(x_

it will suggest a list containing xxxxxxxx params. If I select it, the last line of g definition becomes:

    return f(xxxxxxxx

with xxxxxxxx selected! If I continue type , 3) (I would otherwise type return f(xxxxxxxx, 3) if there were no auto-complete), the line will become:

    return f(, 3)

which is incorrect.

Thanks for checking.

Platform: macOS Majove Version 10.14.3

kkew3 commented 5 years ago

Just found out the second problem has already been posted before: https://github.com/srusskih/SublimeJEDI/issues/273. I kind of understand why it happens, but it's still frustrating to see the "required" option not working. Thanks for checking.

kkew3 commented 5 years ago

The first problem seems related to https://github.com/srusskih/SublimeJEDI/issues/169. After I restarted ST it worked as expected.

srusskih commented 5 years ago

thanks for reporting. will take a look as soon I would have time :(

srusskih commented 5 years ago

yeap, it's duplicate to #273. I have created a wiki page with GIF to describe how it works - https://github.com/srusskih/SublimeJEDI/wiki/What-is-%22auto_complete_function_params%22