Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In VS Code, how do you make IntelliSense show all object keys without typing a character?

In my example I'm using TypeScript, so let's say I have a TypeScript Interface like this:

interface Item {
  name: string,
  qty: number,
  price: number
}

When I go to implement this, I start typing something like this:

const item = <Item>{

}

now, with the current behavior I would type in a character, and IntelliSense will popup with some suggested parameters that have that character in it, for example if I enter e it will pop up with name and price but not qty for obvious reasons.

So I sometimes forget all the parameters, and I find myself hitting a random letter on my keyboard hoping that the parameter I'm trying to remember contains that character.

Is there any way to make it so when I open up those brackets, or hover over them, it just shows me ALL the parameters for this Interface?

like image 856
Jus10 Avatar asked Jan 21 '26 22:01

Jus10


2 Answers

Try Ctrl+space.

From https://code.visualstudio.com/docs/editor/intellisense:

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.) in JavaScript).

like image 120
audunsol Avatar answered Jan 23 '26 19:01

audunsol


The default shortcut for me was cmd+I:

enter image description here

enter image description here Good luck!

like image 40
Ori Avatar answered Jan 23 '26 20:01

Ori



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!