microsoft / vscode

Visual Studio Code

Home Page:https://code.visualstudio.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow intellisense suggestions to be filtered by the user

martaver opened this issue · comments

Currently, Visual Studio Code (as of 1.20.1) offers helpful hints on common language keywords like for and class and enum (I'm using Typescript). I don't need assistance with these words - they're just noise, blocking me from seeing more relevant entries.

I would like to selectively choose what suggestions VSCode offers me - e.g. I'm more interested in what locals and imports are available than being spammed by language keywords. I think being able to go to user/workspace settings and flip on/off any of the suggestions types listed here would be perfect.

Strikes me as something that might be easily achievable too.

Some option to filter/search based on snippet provider would be really good, now I have to either memorize all the snippets, have a cheatsheet printed on my desk (ಠ_ಠ) or go to the readme of the plugin all the time to figure out the correct snippet.

Even an option to disable a particular suggestion type from this list would be nice:

image

I'd immediately disable at least "Keywords"

Would be cool if I could provide an array of the types of suggestions I want and the order of the array would represent the order of the suggestions.

I agree with @kentcdodds that filtering out keywords would be an instant improvement in daily usage of intellisense suggestions.

In every function & import I write, I must consciously avoid the keyword suggestions to get to my snippets, but if I remember correctly, pushing snippets to the top hides the really good suggestions on dot completion. It's been a while since I fiddled with this, so I apologize if that's inaccurate.

I have added a setting editor.suggest.filteredTypes which accepts an object with true/false values for each completion type. This can also be configured per language:

screenshot 2019-03-07 at 18 16 01

This will be available in tomorrows 1.33 insiders build: https://code.visualstudio.com/insiders/

This is awesome! Does this also allow you to choose the order as well?

I hope keywords will still show up by default, as it's going to be very uncomfortable and inconsistent to type all keywords fully without ability to finish them with Enter, just like everything else.