stivoat / tailwind-fold

Visual Studio Code extension that improves code readability by folding long class attributes
https://marketplace.visualstudio.com/items?itemName=stivo.tailwind-fold
MIT License
121 stars 23 forks source link

Add fold length threshold setting #18

Closed VampireChicken12 closed 1 year ago

VampireChicken12 commented 1 year ago

This pull request addresses issue #7. It modifies the folding behavior in the Decorator class by introducing the foldLengthThreshold configuration setting. The foldLengthThreshold specifies the minimum number of classes required for a section to be unfolded instead of folded.

Here are the changes made in this pull request:

diff --git a/README.md b/README.md

Added the foldLengthThreshold configuration setting to the list of supported settings in the README file. diff --git a/src/configuration.ts b/src/configuration.ts

Added the FoldLengthThreshold enum value to the Settings enum in the configuration.ts file. diff --git a/src/decorator.ts b/src/decorator.ts

Added code to split the textToFold into individual class names. Introduced the foldLengthThreshold variable, which retrieves the value of the FoldLengthThreshold setting. Skips folding if the number of class names is less than or equal to the foldLengthThreshold. Please review these changes and consider merging them into the main branch. Let me know if you have any questions or require further clarification.

Fixes #7

VampireChicken12 commented 1 year ago

@stivoat can you review my pull request