vscode shows no function documentation for some functions on hover - visual-studio-code

I guess vscode is supposed to show the full function documentation in the docstring on hovering over it. At least that is what it does for many functions. However, for some functions it only shows the function with all arguments. For example, the first link shows an example where the full docstring is displayed and the second link an example where it isnt. Both functions are from the same package, so this really does not make any sense to me. Does anyone know if there is a fix or if this is a bug that somehow has to be fixed by vscode or something?

Related

How do I get imports to show up when I press ctrl+dot in javascript in vscode?

When writing JSX (or any typescript code really) if you have an available import that's not yet imported, you get a squiggly line under it and can press ctrl+dot on it and then automatically import the code as a "refactoring."
How can I set this up in Javascript? I've seen a screenshot of someone else's VSC where it is available underneath "more options" and so I'm pretty sure it's possible, but when I press ctrl+dot I get nothing.
Note: I'm aware I can press ctrl+space. However, I don't want to do this, for two reasons. (1) alt+space is pretty bad UX because if you press it in the middle of a word it continues to autocomplete even if you already had the full name there and so you are left with an incorrect tag (e.g. if your cursor was after the d in Keyboard for a component called KeyboardRow you are left with KeyboardRowRow) and (2) I want to rebind quick fix to alt+enter to match pycharm; and I want the same hotkey & UX in both Typescript and Javascript.
I haven't worked too much with JS, mainly with TS, but I have two extensions installed in my vscode that helped me a lot while coding in vanilla JS.
Path intellisense and Auto import
You can try if My Code Actions can be used to construct a Quick Fix for these types of PROBLEMS/squiggles

Weird snippet in VSCode

Does anybody know what this weird snippet is? It doesn't expand into anything.
These block-looking snippets underneath are VSCode's built-in snippets, but this first one is useless and it forces me to press the down arrow every time I want to use any loop. It doesn't have anything to do with my extensions and options and I can't get rid of it.
It is not a snippet, for is a keyword in the language you're coding. So it's just a suggestion for code completion.
In Python def is a keyword to create functions:
Check this page from document to see the explanation of the other icons.
Also if "pressing down arrow" bothers you, you have an option to set the visibility of the snippets on the top of the suggestion list:
"editor.snippetSuggestions": "top",

Hide VSCode snippets in suggestion list when no code is written?

In VSCode there is a setting for having snippets first in the list of suggestions ("editor.snippetSuggestions": "top",). This is great, as you might want a snippet to take precedence over other intellisense items when it matches what you've written.
However, the snippets will also be ordered at the top when you display suggestions without writing anything. I often show suggestions inside classes to see what properties/methods I have available, but in those cases I have to scroll through my entire list of snippets before the properties/methods show up. Is there any way to turn off snippet suggestions when you have not written anything?
Example image of the suggestions showing above halfway down in the suggestion list:
This is not an option as of yet, and a feature request for this funtionality has been added. https://github.com/microsoft/vscode/issues/147357
In the meantime, a workaround is to hide snippets from completions and use the explicit > Insert Snippet command instead. (Copied from the issue response)

Where can tooltips be enabled in VS Code

I use VS Code to read C# code and it always showed me tooltips (hints or whatever they're called). I could just hover the mouse cursor over the fragment of code and it told me if that's a class or method or anything else.
I'm not a programmer so that was helpful.
It also allowed me to click on the code fragment with the CTRL button pressed. It opened the related file to the code in an adjacent tab.
But then something happened and I can't do anything of the above. It makes work very uncomfortable.
Can you please give any advice as to how to return these functions?

Show docstring in an widget in Eclipse/pydev?

In Eclipse/Pydev, the docstring is shown in hover and is disappeared after typing anything. Is there a plugin that can show the docstring in a widget that will keep shown until next docstring is triggered?
There's a similar feature called Object Inspect in spyder. It is very useful when using some unfamiliar packages.
Unfortunately there's no such feature right now. Please create a feature request in the tracker for that -- although even better would be a pull request ;) (shouldn't be hard as it'd be mostly creating a view which shows what the hover already shows).