0

I am trying to get used to using VSCode for C# development with Unity. I have noticed that region folding is supported but it seems to be keyed off anything with a '#' symbol. For example observe the following code snippet;

#region FOO
    //Some code
#if BAR
    //Some conditional code
#endif
    //Bit more code
#endregion

In VSCode, if I was to use inlinging to folder the 'FOO' region it will only fold to the 'BAR' conditional.

How can I make it so that VSCode treats regions as all encompassing for folding in the same manner that Visual Studio does?

JimmyDeemo
  • 313
  • 1
  • 15
  • 1
    If this is a bug then it might help to file an issue here (if it doesn't yet exist): https://github.com/Microsoft/vscode - or if you feel up to the challenge, you might even contribute a fix yourself. – Peter B Nov 07 '16 at 10:15
  • Thanks Peter. Well...I suppose i'm not entirly sure if it is a bug. I thought there might just be something to do with seeings or keywords regex i'm missing. Also, wouldn't this actually be part of the C# extension rather than VSCode itself? Of course I will be happy to file a bug if it looks to be that way. – JimmyDeemo Nov 07 '16 at 10:35

1 Answers1

0

Turns out that this is a bug, along with a few others regarding folding.

See here: https://github.com/OmniSharp/omnisharp-vscode/issues/617.

JimmyDeemo
  • 313
  • 1
  • 15