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

Signatures popup disappears after typing any parameter text #611

Open
KM4YRI opened this issue Feb 8, 2017 · 7 comments
Open

Signatures popup disappears after typing any parameter text #611

KM4YRI opened this issue Feb 8, 2017 · 7 comments

Comments

@KM4YRI
Copy link

KM4YRI commented Feb 8, 2017

Expected Behaviour

If I were to type out the following function from a blank Python script:

def foo(bar, baz, boo=True, boy=False, bob=1):

The signature popup happens after '(' is pressed. Now IMO, the expected behavior would be that the signature pop-up should stay on the screen until I'm done typing in parameters. If I've got a list of 5 parameters for a function, and I start typing in the first one, chances are I'll forget what the fifth one is by the time I get that far.

It seemed to work as expected a few months back, I'm assuming an upgrade to Sublime Text or Anaconda broke it?

Actual Behaviour

Assuming same function as above. Start typing new function def foo .... As soon as ( is pressed, the popup signature and docstring shows up as expected. So far so good. Now as I start to type bar, the auto-suggest pops up. This makes the signature popup go away. I cannot, no matter what I do or try to change, get it back unless I literally delete all of the parameter data, then it will pop back up.

Steps to Reproduce

As above.

ST3, Anaconda and OS versions

  • OS: Windows 7 Enterprise SP1 64-bit
  • Python: 3.5.1 64-bit
  • ST3 version 3126
  • Anaconda version: Not a damn clue how to access this. https://packagecontrol.io/packages/Anaconda lists the latest version as 2.1.13 but I can't see any way to verify it in my installation, I don't even know if I have the latest version or not.

ST3 Console Logs

Will post if this isn't a stupid, common problem.

Anaconda's JsonServer Logs

Will post if this isn't a stupid, common problem.

@DamnWidget
Copy link
Owner

DamnWidget commented Feb 8, 2017

The popup can disappear for different reasons, by default anaconda instructs Sublime to maintain the popup visible and to interact with the autocompletion popup, there is not much else that we can do to make Sublime to do not make it disappear.

If you really want to be able to see the signatures I recommend you to disable the signatures popup, anaconda will show you the signatures in the status bar instead, to do so, you can set the option enable_signatures_tooltip as false in the configuration.

You can also enable the complete_parameters and alternatively the complete_paramaters_all that will write the arguments for you in a snippet as soon as you write down the ( character, you can iterate over the arguments using the tab key.

If you are installing anaconda trough PackageControl you probably already have the latest version but if you want to be 100% sure you can always open your ST3 console and write:

from Anaconda.version import version
print(version)

@KM4YRI
Copy link
Author

KM4YRI commented Feb 8, 2017

but if you want to be 100% sure you can always open your ST3 console and write:

I've confirmed it's 2.1.13. Would be nice to see this in the README, but this worked.

The popup can disappear for different reasons, by default anaconda instructs Sublime to maintain the popup visible and to interact with the autocompletion popup, there is not much else that we can do to make Sublime to do not make it disappear.

So is what I'm seeing the 'normal' default behavior that you and others see? What happens when you type in the same command? Does it stay up throughout the parameter list, or no?

And is there any chance that the auto-complete is making it disappear? That's at the precise moment that it happens. As soon as auto-complete happens, the popup goes away.

If you really want to be able to see the signatures I recommend you to disable the signatures popup, anaconda will show you the signatures in the status bar instead, to do so, you can set the option enable_signatures_tooltip as false in the configuration.

That works up until the point that some PEP error over-writes the status bar text. This is not usable. Also it doesn't show the docstring. I'd really like to get the signature popup working, even if that means re-installing everything or chasing an upstream bug / misfeature with the writers of Sublime Text.

@DamnWidget
Copy link
Owner

The ST3 popup functionality is pretty convoluted, I will try to improve the overall user experience in the next anaconda big iteration as I will be rewriting all the ST3 related stuff from scratch.

Did you try to enable complete_parameters? I think that will do wonders for your use case.

@KM4YRI
Copy link
Author

KM4YRI commented Feb 8, 2017

Thanks for the quick replies.

Did you try to enable complete_parameters? I think that will do wonders for your use case.

I did. Will probably take some time to see if I can get used to it or not. It does give me the list of parameters which is cool. However it doesn't help with the problem of displaying docstrings and default function parameters after the function call has been written. So I'm still not back to where I was before this functionality broke. I do recall that it worked fine a few months back.

Per my previous question, what is the default behavior? Is this a problem for everyone right now? Or just me?

@DamnWidget
Copy link
Owner

I experience the same behavior that you do, I will accept any PR if you are eager to try to find a fix but I have already a lot in my plate. I am so sorry for not being more helpful but I like to be honest and currently I am putting my efforts in Golconda that will improve and replace anaconda.

@KM4YRI
Copy link
Author

KM4YRI commented Feb 8, 2017

No worries, that answers my question at least. I'm only vaguely familiar with the Sublime Text API at this point so I probably won't be of much help.

However being that it's a pretty annoying bug to me, I will probably post over at the Sublime Text forum and see if their dev team has any ideas. I'll point them to your repo. If they can tell me what's causing it, I can make the change and submit a pull request.

@KM4YRI
Copy link
Author

KM4YRI commented Feb 9, 2017

@DamnWidget I've created a post over at the Sublime Text forums, detailing this problem. I'm hoping that someone there can shed some light on what's causing the issue, and if it can be fixed.

https://forum.sublimetext.com/t/signatures-popup-disappears-after-typing-any-parameter-text/26005

Would you be able to keep this issue open until I can get some answers there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants