microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.12k stars 29.27k forks source link

Allow intellisense suggestions to be filtered by the user #45039

Closed martaver closed 5 years ago

martaver commented 6 years ago

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.

martaver commented 6 years ago

This issue was created as result of question on StackOverflow here: https://stackoverflow.com/questions/49105475/how-can-i-disable-vscodes-suggestions-for-language-keywords

hvdklauw commented 6 years ago

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.

kentcdodds commented 5 years ago

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.

alexsasharegan commented 5 years ago

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.

jrieken commented 5 years ago

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
jrieken commented 5 years ago

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

kentcdodds commented 5 years ago

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

regs01 commented 5 years ago

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.

martaver commented 5 years ago

Thanks very much for listening VSCode team! On Mon, 18 Mar 2019 at 16:12, regs01 notifications@github.com wrote:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vscode/issues/45039#issuecomment-473925416, or mute the thread https://github.com/notifications/unsubscribe-auth/AF1wMvZ6CXH0HDJWxl1TKj9e8FFccpsKks5vX57egaJpZM4Sb5Wu .