VScode php code folding not working

1

A strange problem i have, i'm new to VScode, in .js files, code folding works, but when i am editing a .php, code folding doesn't seem to work. No conflicts with any installed extensions. Or does VScode simply just doesn't have this feature??

John.C

Posted 2019-01-29T11:06:42.523

Reputation: 11

I resorted to using /* #region */ and /* #endregion */ in every function to get the code to collapse. – xinthose – 2019-09-25T17:49:49.077

Answers

0

I believe code folding used to be indentation based. Things like a differently-indented HEREDOC really screw that up.

vscode added support for language-aware folding, but it needs an extension to implement it. The vscode team suggests filing an issue against one of the popular PHP extensions:

So to get this implemented, please file a feature request against one the PHP extensions: e.g. https://github.com/felixfbecker/vscode-php-intellisense or https://github.com/bmewburn/vscode-intelephense

ref: https://github.com/microsoft/vscode/issues/37494

pabo

Posted 2019-01-29T11:06:42.523

Reputation: 141