Open ptiger10 opened 5 years ago
Only Tab
is currently implemented.
What should be displayed by Shift + Tab
?
Ideally, the behavior would be the same as in Python, which is to create a hover element with the function signature and docstring. If you press Tab a second time (while still holding Shift), the hover element expands, and you can scroll within it. It makes a huge difference for API discoverability when using an analytics library.
Python
This is how Shift+Tab is currently rendered in the lgo notebook kernel. Go
Is there any other way to view documentation for a function?
Sorry, there is currently no way to view the documentation for a function, because source code comments are not parsed / stored.
The function signature instead is available and could be shown by Shift+Tab - contributions are welcome!
As a workaround, to get the signature, I call the function without arguments:
It doesn't work with types, though.
I'm also really interested in getting this working. This is an old project which (from the screenshots) looked to offer documentation for Go when you hit shift-tab.
could we achieve this by integrating gopls (the language server)?
Coming from a Python-in-Jupyter background, I notice that
Tab
works as you would expect (reveals all available methods/attributes), butShift+Tab
(signature hinting) does not. I could not find documentation on this. IsShift+Tab
not supported, or is my setup is incorrect?Example:
n. + Tab
Works as expected -> shows dropdown list:name, description
n.Qux( + Tab
Does not work as expected -> does not show anything and logs in Terminal:Unhandled shell message: inspect_request
My setup: