-
Notifications
You must be signed in to change notification settings - Fork 30k
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
show variable type on hover #8040
Comments
Hi everyone. Hi @weinand. I was wondering if there would be a way to have this functionnality (i.e Having the type definition on mouse over ) but not in debug. For example, I am writting a function which has parameters with some types. But when I want to see the type definition (which comes from other files) of a variable (like parameters), I can't see it.. I just see the type name, not its definition. Thank you for your answer... |
@TitaneBoy VS Code already supports what you are asking for. In the following screenshot I am hovering over the logger.setup method and the hover shows the method parameters: But this informations is only available if you are using a language extension that supports this (in my example it is coming from VS Code's built-in TypeScript extension). |
@weinand: Well...I know that we can have the function definition with mouse over...I think I didn't ask the right question.. Suppose I have these instructions: First_File.ts
Second_File.ts If I want to see the definition of "ITypeInterface " with the mouse over on the "ITypeInterface" name, how can I do ? If the ITypeInterface is defined somewhere else in another file, I had to "Crl + Click" on the type name to get its definition. But by doing that, I will switch my file view and my context at the same time. Is there a way to see the type definition (and not only the name) by mousing over the type name ? Thank you |
Just to be sure: I'm using typescript language in my context and let's assume that import of the First_file.ts is done correctly in the "Second_File.ts" |
Showing the full type definition on hover doesn't make a lot of sense because the hover size is fairly limited. You would only be able to see the first couple of lines in the hover. But try to use the "Peek Definition" action (alt-F12) instead: it shows the full type definition without switching files: |
@weinand : Perfect...This is what I was looking for...Thank you again for your fast answer and your great support...:-) |
This feature request asks for adding the UI for this debug protocol extension: microsoft/vscode-debugadapter-node#32
If the optional 'type' attribute is available for a variable, the type should be shown when hovering over the name part of a variable.
The text was updated successfully, but these errors were encountered: