zokugun / vscode-explicit-folding

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

Different methods for one file type #2

Closed gmaggio closed 6 years ago

gmaggio commented 6 years ago

Is it possible to have different methods for one file type?

For example, I would like to be able to fold with the methods below:

"folding": {
    "javascriptreact": {
        "start": "\\{/\\*",
        "end": "\\*/\\}"
    },
    "javascriptreact": {
        "start": "<",
        "end": "/>"
    },
}
daiyam commented 6 years ago

@gmaggio If the extension supports the following configuration, will it be ok for you?

"folding": {
    "javascriptreact": [
        {
            "start": "\\{/\\*",
            "end": "\\*/\\}"
        },
        {
            "start": "<",
            "end": "/>"
        }
    ]
}
daiyam commented 6 years ago

@gmaggio I've added multiple markers per language. But I've renamed the extension (to Explicit Folding) and renamed start to begin. So your configuration should be:

"folding": {
    "javascriptreact": [
        {
            "begin": "\\{/\\*",
            "end": "\\*/\\}"
        },
        {
            "begin": "<",
            "end": "/>"
        }
    ]
}