Closed anburocky3 closed 3 years ago
Formatting issues in the Blade plugin is a long story... I'll try to analyze the issue, but I think the reason is somewhere inside the Blade plugin.
Yea in the particular file the problem arising. I tried with other blade files with livewire, it's working as expected. Don't know why is it happening.
I tried with Import optimizes, code cleanup
in both cases, I can see that problem exist.
I see the problem with @livewireStyles. There is some bug with <!-- Styles -->
comment. After removing it - it indents correctly. Maybe better to write here: https://youtrack.jetbrains.com/newIssue and choose PhpStorm product.
About body: you can remove it from non-indenting list:
Even if I remove all the @livewireStyles
& @livewireScripts
it's still not formatting good.
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title') - {{ config('app.name', 'Laravel') }}</title>
<link href="https://www.cyberdudenetworks.com/assets/img/assets/favicon.png" rel="icon" type="image/png">
<!-- Fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap">
<!-- Styles -->
<link rel="stylesheet" href="{{ mix('css/app.css') }}">
<!-- Scripts -->
<script src="{{ mix('js/app.js') }}"></script>
</head>
<body class="font-sans antialiased">
<div class="min-h-screen bg-gray-100">
<!-- Page Content -->
<main class="container mx-auto mt-5">
{{ $slot }}
</main>
</div>
@stack('modals')
</body>
</html>
Even these are not formatting. Check inside body.
Have you removed body
from the non-indenting list?
I'm using the latest PHPStorm version with the latest idea plugin.
This is my current blade file
If I format it using PHPStorm IDE, it messes up with the indentation.