Seregwethrin
Seregwethrin

Reputation: 1399

Visual Studio Code auto completion shows a lot of options

VS Code shows a lot of extra options in the suggestions list other than the known type. Screenshots are below.

Is it possible to narrow the options down to the type itself or at least show them at the top in VS Code?

For the type {a: string, b: number}

VS Code: they are in the middle of the huge suggestion list. enter image description here

IntelliJ IDE (Rider/WebStorm): Concise list. enter image description here

Upvotes: 7

Views: 2196

Answers (2)

Seregwethrin
Seregwethrin

Reputation: 1399

After @zerkms's comment I disabled all extensions and commented out all settings in my workspace and IDE's settings.json files, then found that this setting, somehow got in there, was causing that issue.

"editor.snippetSuggestions": "top",

After removing that I got this:

enter image description here

Upvotes: 1

Gama11
Gama11

Reputation: 34118

The completion items you're seeing there are snippets (indicated by their icon), likely contributed by the built-in TypeScript extension. You can use the "editor.snippetSuggestions" setting to control how (or if) snippets are presented:

  • "top" - Show snippet suggestions on top of other suggestions.
  • "bottom" - Show snippet suggestions below other suggestions.
  • "inline" - Show snippet suggestions with other suggestions. (default)
  • "none" - Do not show snippet suggestions.

Upvotes: 7

Related Questions