So I've been using VS Code for a while now and I noticed that for some reason it started having extra snippets which I did not make come up in options, while they are useful I would like to edit them to my personal code formatting style.
I've tried looking for the json
file which holds them however I am unable to locate it anywhere. I figured it would be in my install directory however the cpp.json
file there simply defines the #pragma region
snippet only.
For reference I looked in this location: C:\Users\Rietty\AppData\Local\Programs\VSCode\resources\app\extensions\cpp\snippets
A difference to show the two snippets is like so: and my user defined one which is marked with a user snippet
next to the description.
I also got many new for
loops and so on and so forth:
Where can I find the location of these new snippets so I can edit them to my standards/formatting style?
Update:
I spent a decent bit looking this up and it seems the reason for this is due to the VSCode CPP Tools extension. Recent changes indicate that this occurred due to moving snippets to the hard-coded lexer from the relevant json
file and that it is currently intended.
However an issue was already filed and is hopefully slated to be fixed sometime February 2019.
This was fixed in release 0.22.0 of Visual Studio Code - CPP Tools with the release of the suggestSnippets
setting. Now you don't have to worry about duplicating snippets due to the language server and can only use your hand made ones.
To change this setting:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With