Skip to content

Question: Rule 3 editor support (Emacs) #194

Description

@rap1ds

Hi!

Background:

We just reformatted our codebase using Standard Clojure Style.

I've configured my Emacs to indent with fixed indentation, as instructed here. This works fine, however, it does not recognize Rule 3.

In addition, I use aggressive-indent-mode which aggressively indents the code so that it's correctly indented all the time. I quite like it.

So the problem is that since Emacs doesn't recognize Rule 3, given I have the following code:

(foo bar
     baz
     quaz)

and I add an extra empy line after baz, I get this:

(foo bar
  baz

  quaz)

The output is, of course, fine and correct according to Standard Clojure Style, however, it just creates unnecessary diffs to commits. (And to avoid unnecessary diffs is one reason to use a formatter in the first place, IMO)

What I'd hope for is an Emacs indentation configuration that would understand Rule 3, and produce this:

(foo bar
     baz

     quaz)

Question:

This Issue is not a bug, but a question: Has anyone managed to configure Emacs so that it supports Rule 3?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions