Skip to content

Docstrings #10

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

Closed
Samrose-Ahmed opened this issue Jul 1, 2020 · 9 comments
Closed

Docstrings #10

Samrose-Ahmed opened this issue Jul 1, 2020 · 9 comments

Comments

@Samrose-Ahmed
Copy link

Release mentioned docstring support. Couldn't find anything.

How do you use it?

@Samrose-Ahmed Samrose-Ahmed added the waiting for user response Requires more information from user label Jul 1, 2020
@erictraut
Copy link
Contributor

Docstrings for modules, classes, functions, methods and properties will appear in hover text (when you hover over a symbol), in signature help (the text that appears when you're typing a call expression to help you fill in the correct arguments), and in completion suggestions (as you scroll through the list of suggested completions that are provided when you type).

@erictraut erictraut removed the waiting for user response Requires more information from user label Jul 1, 2020
@heejaechang
Copy link
Contributor

FYI, you can see docstrings shows up, completion, signature help, hover

docstring

@Destaq
Copy link

Destaq commented Jul 2, 2020

@heejaechang This does not seem to be working for me - I tried writing the exact same code as you, but nothing showed up.

oddity

@heejaechang
Copy link
Contributor

so, I see signature help shows doc string. since you didn't try hover, I am not sure about hover. so I guess you are talking about completion?

for completion tooltip, can you give a pause after typing T or meth so that vscode doesn't cancel tooltip out before it showing it?

@Destaq
Copy link

Destaq commented Jul 2, 2020

@heejaechang Yes I'm interested in the completion, that is the #1 feature for me. In your video that you posted, it seemed like it worked completely for you (see below):

ezgif com-video-to-gif

Hovering does work for me. However, what I am interested in is the second box to the side of the completion list that describes the docstring.

When I run it as so:
ezgif com-video-to-gif (1)

I do not get any completion.

@jakebailey
Copy link
Member

jakebailey commented Jul 2, 2020

You have it hidden in VS Code.

Hit Ctrl+Space when the tooltip is open, or hover over the completion item and click the "(i)" icon on the right (which appears when you hover).

@Destaq
Copy link

Destaq commented Jul 2, 2020

Thank you! That did the trick - I must have had it off by default for VS Code, and I have never had access to that second box before. This works now.

@jakebailey
Copy link
Member

It stays open if you open it once, until you repeat the step again to disable it. This is a VS Code behavior, you probably want to ask them to allow it to never be hidden.

I don't know what the key combo is on Mac, but the hover and click method will work to enable it.

@jakebailey
Copy link
Member

Thanks for confirming!

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

5 participants