Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio code folding not working properly

does someone already has experienced this "issue" on visual studio? it did not fold the code on the brackets, just on the function header, should have a - on line 32,35 like on the line 25

enter image description here


1 Answers

I had the same problem with python code. For me this helped:

File -> Preferences -> Settings -> Text Editor -> Folding Strategy -> Set to "indentation"

"Folding Strategy - Controls the strategy for computing folding ranges"

This was set to "auto" for me, after changing to "indentation" it works.

I suspect the "auto" setting uses something smarter which may break depending on system, environment and used imports.

like image 79
xaedes Avatar answered Dec 02 '25 19:12

xaedes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!