zokugun / vscode-explicit-folding

Customize your Folding for Visual Studio Code
MIT License
99 stars 14 forks source link

Add a debug mode with feeding a log #42

Closed FALLAI-Denis closed 3 years ago

FALLAI-Denis commented 3 years ago

Hi,

Fine-tuning the folding conditions can be tricky, especially with regular expressions.

It would be necessary to be able to have a debug mode in the extension, with feeding of a specific log output: the results of regular expression tests (since the extension transforms everything into regular expressions), would be displayed in this log. To be able to find to which case of folding corresponds which regular expression test, it would be necessary to be able to name each case of folding.

Either something like:

"folding": {
     "debug": true,
     "language": [
      {"name": "name_of_folding_case_ # 1"
      , "beginRegex": "start_expression_ # 1"
      , "endRegex": "end_expression_ # 1"
      }
      ,
      {"name": "name_of_folding_case_ # 2"
      , "beginRegex": "start_expression_ # 2"
      , "endRegex": "end_expression_ # 2"
      }
   ]
}

For the content of the log, see for example what the site https://regex101.com/ displays as information on the results of a regular expression in its "match information" window.

Thanks.

daiyam commented 3 years ago

Ya, it's being in my todo list since the beginning of the year...

FALLAI-Denis commented 3 years ago

Solved.