Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I configure VSCode Intellisense for TypeScript to display properties only?

I have an API which uses parameter objects and the only way to stay sane is to have intellisense.

It works to an extent, but this is annoying.

a list of stuff i don't want

None the less, I see that the list does contain properties i want. How can I make this list only show my properties of the object, and not the kitchen sink?

i want just these in the list

If it isn't too clear, then basically, I don't want to cycle through a massive list of stuff, looking for analytics, I don't want to right click and go into this method searching what is available, and I don't want to seek docs either. I just want the "properties" of an object to take priority.

like image 712
user1059939 Avatar asked Oct 16 '22 11:10

user1059939


2 Answers

These suggestions are coming from the auto import extension and not VS Code's standard JavaScript and TypeScript language features. You can tell this by the [AI] in the suggestion item label

VS Code has supported auto imports out of the box since 1.18 so this extension should no longer be required. If the built-in auto imports aren't working properly, please file an issue

like image 158
Matt Bierner Avatar answered Oct 21 '22 05:10

Matt Bierner


Anyway, уou can also control your Intellisense preferences in Settings>Text Editor>Suggestions page:

vs code text editor display properties suggestions hide words

like image 22
Michael Avatar answered Oct 21 '22 03:10

Michael