visual-studio-codeintellisense

How to order VSCode intellisense by number of uses in current file or codebase?


Is it possible to order VSCode intellisense by number of uses in current file or codebase?

If so, how?

For example, in go code, when I type log., the first results are Default, Fatal, ...

I'm assuming it's in alphabetical order by default. In my codebase, I have not used these options but have used log.Println multiple times. So, I want to change the order of intellisense so that the most commonly used ones are always at the top.


Solution

  • Try to change the option as suggested in the documentation for suggestion selection. Looks like the option "editor.suggestSelection": "recentlyUsed" is close to what you want. (See also settings in UI in picture below, with help message describing what it does precisely).

    UI settings