Open eFail opened 1 year ago
Hey does option does not work in all cases? Like disabling it and reenabling it? What about having the description being only one word?
Can confirm disabling and re-enabling doesn't help. And it doesn't seem to be related to word count or whether or not the regions are indented.
Also wanted to report this. Region naming abbreviation doesn't work at all.
@eFail @AndreaPontrandolfo Would you mind providing more details on the case? I'm not able to reproduce it. And maybe try to disable all other extensions to see if one is interfering with it.
@mtbaqer I tried disabling all extensions except for Better Folding. Still doesn't work.
Here's the sample code I'm using:
A few days ago I cloned the extension and did a little old-school debugging using information messages at various points in the code. I only had a few minutes to look around and I'm not familiar with VS Code extension development at all, but at first glance it was looking to me like REGION_REGEX
inside regionRangesProvider.ts
doesn't return any results. Not sure if that's helpful at all. Could it be as simple as a regex string needing to be tweaked?
@mtbaqer. I have solid repro steps for you. Any way you could take a look and get a fix out for this soon?
Inside VS code terminal: npx create-react-app foo
In VS Code:
index.js
//#region Bar
function bar(){
}
//#endregion
Observe that your extension works as expected:
src
folder and choose "New file". Name it foo.js
:
Paste in this code:
import React from "react";
export default function Foo(){
//#region Bar
function bar(){
}
//#endregion
}
So it seems like the regex you're using might be breaking down somehow inside of function-based ReactJS components? I hope this can help get a fix out for this soon.
When I collapse the following code:
I still see the keywords:![image](https://user-images.githubusercontent.com/1672416/215411513-ee05fa45-eb07-4523-b299-a2cce70da260.png)
No extension host issues are being logged as far as I can see.
Extension version 0.2.2