IBM / zopeneditor-about

IBM Z Open Editor: File issues here!
https://ibm.github.io/zopeneditor-about
Apache License 2.0
47 stars 25 forks source link

Source folding in HLASM #317

Open SG-A47 opened 1 year ago

SG-A47 commented 1 year ago

Development environment used

Problem Description

Source folding in HLASM doesn't work usefull when you have commented code. The arrow is presented at a code line which is commented. With a click on the arrow active code will hide. In HLASM this is not usefull.

Expected behavior

SG-A47 commented 1 year ago

Can't add a picture with an example.

phaumer commented 1 year ago

Thanks @SG-A47. Great idea.

FALLAI-Denis commented 1 year ago

Hi @SG-A47,

I suggest you look at COBOL folding rules #141.

I think you can apply same solution to HLASM source code.

SG-A47 commented 1 year ago

Hi, COBOL folding let to the right extension. It is called "Explicit Folding". I realized source folding for assembler with these lines in the settings.json: <<< "editor.foldingStrategy": "auto", "editor.defaultFoldingRangeProvider": "zokugun.explicit-folding",
"workbench.colorTheme": "Blackboard", "editor.showFoldingControls": "always", "notebook.showFoldingControls": "always", "editor.folding": true, "explicitFolding.debug": false, "explicitFolding.wildcardExclusions": ["cobol"],
"explicitFolding.rules": { "hlasm":{ "beginRegex": "((^[]{1} )|(^[]{1}$)|(^[]{1}[A-Z]))", "whileRegex": "((^[]{1} )|(^[]{1}$)|(^[]{1}[A-Z]))", "foldlastline": "false", "nested": "true", "autoFold": "true" } }

<<< I made the following assumptions:

Thanks to FALLAI-Denis for the hint.