zokugun / vscode-explicit-folding

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

Broken since last update #5

Closed vincent456 closed 5 years ago

vincent456 commented 5 years ago

I'm using Visual Studio Code version 1.29.0 and the addon seems to be broken. It used to work very well before. Can anyone confirm or infirm that the addon has broken ?

daiyam commented 5 years ago

@vincent456 I'm looking at it :sob:

daiyam commented 5 years ago

@vincent456 No issue here (on Javascript files). Can you tell me your configuration and the type of files you are using?

vincent456 commented 5 years ago

My versions are : VSCode version 1.29.0 commit 5f24c93878bd4bc645a4a17c620e2487b11005f9 electron 2.0.12 chrome 61.0.3163.100 NodeJS:8.9.3 V8 : 6.1.534.41 architecture x64 latest ubuntu 18.10, everything updated

my settings are

{
    "cmake.configureOnOpen": true,
    "terminal.integrated.rendererType": "dom",
    "editor.multiCursorModifier": "ctrlCmd",
    "folding": {
        "*": [{
            "begin": "/*",
            "end": "*/"
        },
        {
            "begin":"//region",
            "end":"//endregion"
        }
        ]
    }
}

and I try to appy the custom folds on C++ files (.h,.cc, etc)

vincent456 commented 5 years ago

Is there a way to debug these kinds of problems ?

vincent456 commented 5 years ago

I got news : the folding region I'm trying to do with the "/" and "/" yeild "syntax error : invalid regular expression "/*//" nothing to repeat"

daiyam commented 5 years ago

Ok, the markers are RegExp. So it should be:

"folding": {
        "*": [{
            "begin": "\\/\\*",
            "end": "\\*\\/"
        },
        {
            "begin":"\\/\\/region",
            "end":"\\/\\/endregion"
        }
        ]
    }

But I have an issue with c++ files. I will try to look into it this week-end. I have to look into VCS and understand what have been changed since my extension hasn't changed...

I have a PR in VCS to allow more flexibility more but right now, it's a dud!

vincent456 commented 5 years ago

it's fixed : the extension is using regular expressions, so in order to do "/" I had to do "\/\" instead

daiyam commented 5 years ago

Great! I will update the README to clearly indicate that it's using RegExp.

vincent456 commented 5 years ago

thank you for the help