title: How to change Prettier behaviour on .less Files?
body: <p>I am using Visual Studio Code and <a href="https://github.com/prettier/prettier" rel="nofollow noreferrer">prettier</a> in my Typescript project. It also formats <a href="http://lesscss.org/" rel="nofollow noreferrer">less</a> files.</p>
  
  <p><strong>What prettier does is putting every selector on a single line..</strong>
  </p>
  
  <pre class="lang-css prettyprint-override"><code>body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4... {
      margin: 0;
      padding: 0;
  }
  </code></pre>
  
  <p><strong>Ends up as a very loooooooooooooong chain of selectors:</strong></p>
  
  <pre class="lang-css prettyprint-override"><code>body,
  div,
  dl,
  dt,
  ...
  {
      margin: 0;
      padding: 0;
  }
  </code></pre>
  
  <p><strong>What I would like Prettier is, to just leave me alone (on this specific aspect. in <code>.less</code> files.) Keep them in a line (or several) if I wanted to. Or on multiple, if that is, what he finds:</strong></p>
  
  <pre class="lang-css prettyprint-override"><code>body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4... {
      margin: 0;
      padding: 0;
  }
  
  ul,
  ol {
      list-style: none;
  }
  </code></pre>
  
  <p><strong>Btw:</strong> I can „prove“, that only prettier has a hand in this, not any built-in stuff in vscode or my tslint, by putting a <code>// prettier-ignore</code> line before those selectors. That would also be a local fix, but I want a more general solution... without having to throw anti-linter comments at all of this...)</p>
  
  <h2>update:</h2>
  
  <p>Maybe the solution is somewhere near pointing <code>.less</code> files to a different parser. However I can't find a single piece of sample code, how to tell prettier my postcss-Preferences then...</p>
  
  <pre class="lang-css prettyprint-override"><code>{
      "singleQuote": true,
      "printWidth": 140,
      "overrides": [{
          "files": "*.less",
          "options": {
              "parser": "postcss"
          }
      }]
  }
  </code></pre>