Skip to content

Go to Type Definition #3833

@dutsky

Description

@dutsky

Is your feature request related to a problem? Please describe.
Hi! I'm looking for the way to go to type definition of var when I omitting local variable type like this:

final myVar = doSomething();

I can't find fast way(hotkey or something) to go to type definition of myVar.

There is no problem to open type definition if you annotate variable type like this:

final MyType myVar = doSomething();

here you can set cursor to MyType and press F12(in default hotkey layout) and MyType definition will open, but it won't work in example before (F12 will show you list of references).

Describe the solution you'd like
It would be nice to have some kind of Go to Type Definition hotkey. Like set cursor to myVar and press some hotkey to open type definition of MyType

Describe alternatives you've considered
As alternative you can hover myVar with mouse cursor and popup with type name will appear. After that you can use Go to Symbol mechanic(Ctrl + T) and type name of type(sorry :) ) there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions