Preprocessor directives are not getting collapsed when I fold a function with non-indented pragmas in VSCode

123 Views Asked by At

I'm making a unity game and trying to fold a function, but my preprocessor directives (checks if it's on android or not) are not getting collapsed. Only code until the directive is collapsed.

Code before folding:

code before folding

Code after folding:

code after folding

Indenting the pragma directive until its indentation is the same as code within that block works, but I want to use the proper format, plus it looks easier to see.

I found this issue but sadly it was only for the C++ tools extension, and I am using C#. Is it possible to collapse this without indenting it?

0

There are 0 best solutions below