Code style -> blank lines

This is a small issue that has been bugging me for years. While I love the code formatter in IntelliJ and use it constantly, it's missing two "Blank Lines" options in my opinion: 1) number of blank lines *before class close* (the last curly brace closing the class. I like to have a blank line and through 8 releases have hoped there would be a way to do it 2) a force option on "Around Method:" The formatter won't strip out extra blank lines between methods even though I specify 1. Also at the very least, if you were to at least make sure the "Around Method:" option worked for the last method in the class that would solve my #1. Is there something I'm missing on how to do this? Can I customize the code formatter in some way?

4 comments
Comment actions Permalink

Hi Vard,

  1. It's not possible to do that at the moment, feel free to submit corresponding ticket to IJ tracker;
  2. Please try the following:  
    • 'Project Settings - Code Style - Blank Lines - Keep Blank Lines - In declarations - 1;
    • 'Project Settings - Code Style - Blank Lines - Blank Lines - Around Method - 1;


Denis

0
Comment actions Permalink

I'd also like to have a way to add a blank line after closing curly braces as well for JSON & stylus files. It's only possible with JavaScript at the moment, unfortunately.

0
Comment actions Permalink

Great. Thanks!

0

Please sign in to leave a comment.