Open billwert opened 8 years ago
This'd be nice to do, but I don't think there's a way to do this with VS Code snippets today. AFAIK, there's no way to run code when a snippet expands.
Hmm, that's too bad. It may be worth trying to push a request down into VSCode to enable this. I am going to open another issue pertaining to the exception snippet: it currently includes the serialization ctor, which isn't supported on .NET Core. I'd love to see the snippet support include TFMs somehow so you can get appropriate snippets for the platform you're targeting. Perhaps we just need a meta issue for "have snippets work better in the context of the project they're being used in", which would drive the right platform support?
When you use the 'cw' snippet to insert Console.WriteLine in VSCode, you always get 'System.Console.WriteLine()', regardless of the presence of 'using System' in the file.