docstring popup for functions when in brackets
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
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.
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:
this is marimo (note that this is the end of the pop-up and it's still showing the function signature):
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.
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.
Thanks for looking into this - and just sharing a thought, I think being able to use Ctrl+Space on the symbol to display this pop-up has its value; however, in my opinion, even more, important is being able to bring up this pop-up while the cursor is found within the parenthesis that does not currently seems to be the case for me at least.
It is quite often with some functions/methods while beginning writing those parameters; you often need to get back to see what is available, now moving the mouse to the symbol (e.g. function name) you get this - but does distract while typing, so this keyboard shortcut (or a new one) to open it within parentheses I think would enhance the UI experience even more 🙂👍
Maybe I'm missing something, but if my cursor is between the parentheses in some_function(), hitting Ctrl + Space does nothing. Only if I start typing a valid parameter of the function does it show the docstring. Is it expected behavior?
I think that is the feature we're looking forward to 😏👍
I think being able to use Ctrl+Space on the symbol to display this pop-up has its value; however, in my opinion, even more, important is being able to bring up this pop-up while the cursor is found within the parenthesis that does not currently seems to be the case for me at least.
Thanks for the feature request. It makes sense to me, we can try to improve this. We are in the process of experimenting with adding a language server to marimo, so we might hold off until that is in place.