These are example configurations that can be used in the custom-auto-fold.rules
setting.
Fold imports on Java files
{
"fileGlob": "**/{*.java,*.class}",
"linePattern": "^import\\s",
"firstMatchOnly": true
},
ℹ️ - Due to limitations in the JDT, imports on *.class files are not foldable. See the extension Java Class Imports Folding for a workaround.
Fold copyright header comments on Java files
{
"fileGlob": "**/*.class",
"linePattern": "^(/| )\\*.*[cC](opyright|OPYRIGHT)",
"firstMatchOnly": true
},