Open mitchuman opened 2 months ago
By "buggy", do you mean the large empty space? The "Fold Length Threshold" has been changed from classes to characters
The void space and the change of indentation with the closing brackets does look very awkward.
I personally was OK with the folding not happening when used with helpers like clsx
or twMerge
with v0.1.0, so maybe have an option to disable folding with these conditions?
Ideally though, I would want to see a clean fold and collapse of lines
<figure
className={...}
// OR below to denote the usage of cn/clsx/twMerge
className={cn(...)}
>
Noted on the threshold. I missed the change there...
I only just realized the indentation issue. Maybe someone will come up with a PR in the next few days. Otherwise, I will remove multiline support as a temporary fix.
@stivoat It might be helpful to add multiline folding as an option (to turn off/on). I think that folding makes sense when it is one line since tailwind classes can become verbose. I use an eslint plugin where it breaks classes acrouss multiline if execceding a certain charchter limit. In this case I would like to see the list of classes since it does not mess up the UI. However, with latest update I am having the same issue as @mitchuman
After installing the recent v0.2.0 update, the following is happening:
10
in the video, but folding occurs with only 2 TW classes)https://github.com/stivoat/tailwind-fold/assets/73133191/aaafb53e-7d95-4e6b-94a7-ac242b8dc2ba