opensas
opensas

Reputation: 63425

use ctrl-click on vscode to go to implementation instead of peek definition

I'm using VS Code with a .svelte file.

When I ctrl-click it shows me the definition in a panel below the line. Same think happens if I right click and choose go to definition or peek -> peek definition, which is a bit odd.

I'd like ctrl-click to open a new tab with the definition (that is what happens if I right click and select go to implementation)

btw, I think my go to definition is not working so well, as it's just doing the same as peek.

Upvotes: 19

Views: 37061

Answers (4)

You may also consider downloading PHP intelephense, a vscode extension for PHP.

Upvotes: 1

Kdave07
Kdave07

Reputation: 19

You may consider also adding the corresponding language extension according to the programming language you are using, I added the language extension and it got solved.

Upvotes: 1

Rama Krishna
Rama Krishna

Reputation: 31

To avoid peek panel below the code when ctrl + click is pressed, change this setting in vscode user settings. File -> Preferences -> Settings -> User: definitionLinkOpensInPeek Uncheck the check box.

Screenshot

Upvotes: 3

Marc
Marc

Reputation: 14295

There seems to be a new setting editor.gotoLocation.multipleDefinitions which, if set to peek (as is the default) will open a peek even if the definition is unique. This may be a bug but setting it to goto solves it for me.

enter image description here

Upvotes: 33

Related Questions