livewire / flux

The official Livewire UI component library
https://fluxui.dev
501 stars 40 forks source link

VS Code auto formatter adds spaces on <flux> tags #788

Closed nerisonpitogo closed 2 days ago

nerisonpitogo commented 2 days ago

I have "format on save" enabled in my vscode and I want it to keep this way. However when using flux, the code is altered during formatting.

ex. Working code.

              <flux:badge size="sm" :color="$user->status_color" inset="top bottom">
                    {{ $user->status }}
                </flux:badge>

But during save (pressing ctrl + s), the code becomes.

               <flux:badge size="sm" :color="$user - > status_color" inset="top bottom">
                    {{ $user->status }}
                </flux:badge>

Notice the spaces in $user - > status_color which causes error.

ju5t commented 2 days ago

I doubt this is something Flux can fix. What formatter are you using? And have you reached out to them? As somehow it does not recognize Flux as a Blade component. I assume you do not have this issue with other Blade components?