zokugun / vscode-explicit-folding

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

Version 0.9.1 no longer folds last line. #30

Closed michael-lumley closed 3 years ago

michael-lumley commented 3 years ago

I was using this extension in VS code as described in this thread. https://github.com/microsoft/vscode/issues/3352. On release of the new version, the extension reverted to leaving the trailing parenthesis/bracket in place. I successfully reverted to 0.9.0 without issue, and don't intend to upgrade to 0.9.1 until the issue is resolved.

daiyam commented 3 years ago

@michael-lumley Can you give an example with your config? I've not changed how the folding ranges are resolved...

michael-lumley commented 3 years ago

This is from the thread linked above but I confirmed that the config below DOES fold a trailing } on 0.9.0 and DOES NOT on 0.9.1. In other words:

0.9.0: image

0.9.1: image

"folding": {
    "*": {
        "begin": "{",
        "end": "}"
    },
}
daiyam commented 3 years ago

@michael-lumley It's what I thought. The newest version isn't providing the folding you are seeing but it's another extension. Can you tell me which language you are using and the extension providing it?

Here what I got with Javascript and the builtin language provider: screenshot

daiyam commented 3 years ago

@michael-lumley hi, I need more infos to investigation the issue because it depends on how VSCode merge the folding ranges from the different providers. So I need the language you are using and the extension which is providing it. Additionally, in the config, you could test to replace the * with your language.

daiyam commented 3 years ago

@michael-lumley hi, I still need those infos. Can you give them? Thx

sleepylemur commented 3 years ago

@daiyam Hi, I'm seeing the same issue. Not sure how to check what the currently active folding provider is. This setting block hides the closing brace on 9.0 but not with 9.1

  "folding": {
    "*": {
        "begin": "{",
        "end": "}",
    }
  }

I am able to get it to work for just typescript or just javascript files by replacing "*" with "typescript" or "javascript" respectively on 9.0, but I'm unable to get 9.1 to work with either.

Also I believe I'm using the builtin typescript and javascript. Not sure how to check, but searching extensions for "@installed javascript" or "@installed typescript" both return 0 results.

daiyam commented 3 years ago

@sleepylemur I can't reproduce the problem so can you give me an example with the language used ;) Thx

sleepylemur commented 3 years ago

Example using javascript: filename: test.js

function happy() { console.log("yo"); }

On 9.0 looks like

image

On 9.1 looks like

image

Not too familiar with vscode extensions and why mine would work differently than yours. I'll see if I can dig through and debug the issue since reproducing on your end is probably not going to be easy.

Also I'm on macOS 11.2.1

VSCode Version: 1.53.2 Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4 Date: 2021-02-11T11:45:54.515Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Darwin x64 20.3.0

daiyam commented 3 years ago

@sleepylemur Thanks for your info, I was able to reproduce it and I feel pretty stupid... I've misread a max() with a min()... several times. I've fixed and published the new version. Tell me if it's working for you. Thx

sleepylemur commented 3 years ago

@daiyam confirmed that 0.9.2 works for me. Thanks for the extension!

daiyam commented 3 years ago

Great! Thanks for your help it was bugging me.