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

docstring popup for functions when in brackets #2080

Open
robaki opened this issue Aug 22, 2024 · 3 comments
Open

docstring popup for functions when in brackets #2080

robaki opened this issue Aug 22, 2024 · 3 comments

Comments

@robaki
Copy link

robaki commented Aug 22, 2024

Description

I can see that there is a docstring popup when hovering over function/object, but using this requires grabbing a mouse and moving it. In jupyter lab when you're writing within function's brackets you can shit+tab to show/hide a docstring popup. It would be great to have something like that here too.

Suggested solution

No idea how to implement it.

Alternative

No response

Additional context

No response

@akshayka
Copy link
Contributor

You can use Ctrl+Space to toggle completion. Use it at the end of a symbol to toggle the docstring for that symbol. Does that work for you? You can remap the command via the keyboard shortcuts option in the notebook hamburger menu.

@robaki
Copy link
Author

robaki commented Aug 22, 2024

OK, I see there are suggestions for autocomplete which show the names of keyword arguments. This is useful, but not full info (not sure if providing it is withing the scope of this project then). Also hitting Ctrl+Space the second time doesn't hide them for me, once they show up --- typing some more or deleting text does.

I just also realized that the hover pop-ups show only function signature, not docstrings themselves, at least for pandas.read_csv method:

this is jupyter:
image

this is marimo (note that this is the end of the pop-up and it's still showing the function signature):
image

@akshayka
Copy link
Contributor

akshayka commented Aug 22, 2024

OK, I see there are suggestions for autocomplete which show the names of keyword arguments. This is useful, but not full info (not sure if providing it is withing the scope of this project then)

It's within scope — we can improve this.

I just also realized that the hover pop-ups show only function signature, not docstrings themselves, at least for pandas.read_csv method:

For most methods the docstring shows up. I'm not sure why pandas.read_csv's docstring isn't showing up, I see the same issue on my end. We can try to improve this too. Thank you for reporting.

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