Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio code beautify format issues

I'm using VS Code + js-beautify + Beautify css/sass/scss/less, and I'm facing couple of annoying issues when I format my code (don't know how to solve them):

  1. This is NOT how I want my background color to look.
    From:

     background-color: rgba(0, 0, 0, .0);
    

To:

    background-color: rgba(0,
    0,
    0,
    .0);

I want it to be format as one line (like "from").

  1. The "cursor" property is in different color
    enter image description here
  1. When I format my html code, there are line spaces in the body and the html.
    From:

     <!DOCTYPE html>
       <html lang="en">
        <head>
         <title>React App</title>
        </head>
        <body>
        <div id="root"></div>
       </body>
      </html>
    

To:
    <!DOCTYPE html>
      <html lang="en">

       <head>
        <title>React App</title>
       </head>

       <body>
       <div id="root"></div>
      </body>

     </html>

I want it to be formatted without any empty spaces (like "from").

like image 507
Or Assayag Avatar asked Dec 07 '25 10:12

Or Assayag


1 Answers

You can change format settings in VS Code's settings.json file. By default, head, body and html tags include a newline before them. If some issues started happening only after installing an extension, then there may be conflicting settings.

like image 160
quiqs Avatar answered Dec 11 '25 03:12

quiqs



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!