-
Notifications
You must be signed in to change notification settings - Fork 292
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
Contextual help #1307
Comments
We have this on hover? I assume you've already seen that and would prefer a separate window? |
Yes, I have seen it. A couple of points:
On a personal note, I find the intelisence not very useful since very often the help hover window takes a lot of time to show up. |
+1 |
I am looking for same feature. Thank you ! |
okay thanks for your response |
@rchiodo not the same, Jupiter’s automatic contextual help is just amazing. Being able to see the state of variables and documentation just by clicking on a cell is just great. Huge productivity boost. |
@javierbq so the clicking is the key? Doesn't seem too hard to implement this on clicking on a value. |
For future reference, contextual help is on the help menu in Jupyter Lab. It opens a tab at the bottom that responds to click events in code with sending an 'inspect_request' to the kernel for whatever is under the mouse. The results of the inspect request are then displayed in the help panel. |
Yes, in my experience it makes a big difference to have the extra tab open side by side the editor and whereever the cursor is, it shows the output of ?var for that variable. |
/cc @claudiaregio @jmew |
I would like to strongly support this! I have been switching between Python IDEs on a search for the best, and have now arrived at VS Code which in my experience is superior in many ways. But one feature I really miss from Jupyter Lab is the automatically updated contextual help panel. As I wrote in issue microsoft/vscode-python#11655 linked to above, the current pop-up crushes everything together, is too small to read long texts, and disappears too easily on mouse movement. It is also often hard to trigger. Yes, it is possible to use the IPython-style |
Just adding another voice to support this - this feature alone is why I am not in Vscode full time. It might sound trivial but this feature easily saves me hours in development time or when coming up to speed on a package. |
Same as Jaunson! |
Indeed, this is what keeps me productive in Jupyter. I don't have to memorize all the stuff. When it gets implemented, please also enable a keyboard shortcut for it. In Jupyter there are 3 shortcuts that display progressively more information:
An extension that kind of does this is Kite Copilot : https://www.kite.com/copilot/ … but it is an external app and I don't want to install the whole of Kite for this. Another external app which provides similar functionality is Dash -- there is an extension which interfaces with VS Code, but you need to have Dash window next to VS Code window (to recreate the experience). I haven't tested if it woks in notebooks. I would say that this functionality will benefit the non-notebook workflow too |
+1 on this. I haven't been able to get shift+tab when I'm working with vscode jupyter to work the same way as it does in browser, and have tried a few things at this point. This feature is pretty much the only reason I still use the browser version. |
+1 |
1 similar comment
+1 |
++1 |
Hey @rchiodo , I think this feature is a major productivity booster and time saver. RStudio, similarly has a separate window for that, "Help" pane. Just select a function and press Advantages: Thank you |
I use VSCode for editing existing Python/SQL scripts but never the Jupyter notebook feature when starting new projects because of this feature. The boost to productivity and learning an API is huge especially with the context panel and the shift tab shortcut. Same issues as other reported with hover and how quickly it disappears, and having to switch between keyboard and mouse is not ideal. This would be an amazing feature to add as another panel like the data viewer panel but one that you can position permanently on a part of the screen. Thanks for considering this! |
+1 - pls add this functionality to VSCode. It would be a significant breakthrough. You also may want to look at Spyder. I love its always-on help. |
I just discovered this new extension which addresses the issue very well: [https://marketplace.visualstudio.com/items?itemName=bierner.docs-view] |
@Cyberjoe, that's a great find! Unfortunately, it doesn't work within notebooks, but neither does the standard popup (at least not properly). |
Fantastic extension, it would be great to see it incorporated in VScode as the default. Thanks a lot for the suggestion |
I discovered this trick too using "Open Definition to the Side" command: https://www.youtube.com/watch?v=3p4pXhpPVf4 |
@rchiodo indeed a great news! Will this work in the Interactive Window too? (I only use Jupyter Notebooks if I really have to, the Interactive Window is a better and cleaner product in my opinion) |
It kinda works in the interactive window. At least in cells already run. Doesn't work in the input box because VS code doesn't treat that the same. |
This is great! Thanks for working on this. |
This is such great news!! So happy to hear that this is being worked on, it remains probably the most important issue in vscode for me! |
This is great. Thanks for implementing this. It is very much needed. Just wondering, whether this could be brought to python script as well? |
@Fred-Wu this particular window is using the jupyter kernel's requestInspect message. That might be possible if the user was using the interactive window with a python file but otherwise there's no backing kernel. However the docs-view extension mentioned elsewhere in this thread might be usable for you. It provides the pylance hover documentation in a separate window. |
Thanks for the information. I have tried docs-view extension. Just wondering why pylance hover doc behaves differently to jupyter kernel doc, in which pylance provides minimal and incomplete information compared to jupyter doc. For example, with your extension, or run with
But in a normal script, it just shows
Also when I point to the |
Pylance doesn't know the actual type of something because things can be unions or have no type specified. Only actually running something can the type always be figured out. That's why Jupyter shows more information. For your second question, VS code doesn't seem to support copying from our panel. Not sure why. You could log a bug here: |
I'm closing this issue as we have an extension that provides this functionality in the following extension |
One of the great benefits of python notebook is the exploratory nature of it. I personally find the contextual help window in
jupyter lab
a very helpful feature that makes the exploratory data analysis very easy by providing a fluid guide for the many API's that one might have to try. I don't know how big of an ask this is, but it would be much appreciated to provide this in VScode notebook editor.Below is a screen shot of what I am referring to in jupyter lab. The functionality is that by clicking on each function, the docstring for that function is show in the contextual help window.
The text was updated successfully, but these errors were encountered: