visual-studio-codevscode-snippets

Where are the preferences about hidden snippets stored?


VSCode has the ability to hide built-in code snippets. This is the functionality I'm referring to if it's not clear: https://github.com/microsoft/vscode/pull/109916.

I want to version control all relevant settings in my environment so I can quickly set up on any new machine. I already track VSCode's settings, keybindings, tasks and custom snippets, but I can't find where the list of all the snippets I've hidden is stored.

I've looked through the files stored by VSCode and those modified during the implementation of this functionality, but I couldn't find the list of hidden snippets.

Can you help me locate this file?


Solution

  • In the user data directory under /User/globalStorage/state.vscdb (an SQLite DB), with the key snippets.ignoredSnippets. The value is a JSON array where the contents are strings identifying snippets.

    One of the related parts of the code change in the PR you linked is https://github.com/microsoft/vscode/pull/109916/files#diff-3ab6c79dac791538cc24f471292a0ef72e295c6b974e211d6a07be83a6c371d8R157.