software_writer
software_writer

Reputation: 4468

Visual Studio Code: How to show Overloads in IntelliSense?

I am working with the new asp.net core 1.0 framework on Visual Studio Code.

My question is, how do I traverse through all the overloads a method might have?

VS Code method overloads

Upvotes: 39

Views: 28730

Answers (2)

Eve
Eve

Reputation: 121

I can't comment on the accepted answer but in case anyone has the problem Dawson B mentioned, where you can't navigate the little window of overloads with the vim extension enabled, I found a solution. It was difficult to figure out what that window is called as it's not easy to google, but it is apparently a ParameterHint.

Open the Keyboard Shortcuts with Ctrl+K Ctrl+S, search for "hint", click the pencil to the left of showNextParameterHint, change to Alt+N, and showPrevParameterHint to Alt+P, to not interfere with the Ctrl+N/P binding to Intellisense suggestion navigation. Of course if these conflict with some other extension/custom binding you have, pick whatever works best.

Upvotes: 12

DaveShaw
DaveShaw

Reputation: 52788

When at that stage you can just press ( and it will prompt you for the overloads.

Take this example:

enter image description here

I press ( and I get:

enter image description here

If I happen to change focus, I can go back into the call at this.M1( and press Ctrl+Shift+Space (or +Shift+Space on macOS) to get the overload prompt again:

enter image description here

Pretty much the same as Visual Studio.

This is in VS Code 1.7.1, C# 1.4.1 extension.

Upvotes: 58

Related Questions