zokugun / vscode-explicit-folding

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

Fold className attribute in .jsx files #72

Closed maplesyrupman closed 2 years ago

maplesyrupman commented 2 years ago

Describe the issue

Trying to achieve folding of className attribute in .jsx files for react. I am using tailwind so my classNames get quite verbose.

Code Example

hoping to convert this:

   <div className='some-superlong list-of-tailwind utility-classes that clutter-up this-file'>
      <p className='some-more utility-classes that-need to get-folded'>
   </div>

into this:

   <div className='...'>
      <p className='...'>
   </div>

I also asked this question on stackoverflow

Any help would be greatly appreciated. I also feel like this would be an extremely useful extension, but am unsure as to how I would go about creating this.

daiyam commented 2 years ago

I'm sorry but vscode can't do that. It's folding a blocks of lines, not a block of characters like you want. This extension is providing another way to define the folding ranges. It doesn't change how there are displayed.