cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Indentation in ns form different from emacs

Open den1k opened this issue 8 years ago • 7 comments

(ns my-ns.indented-in-cursive
  (:require 
    [clojure.pprint]))

(ns my-ns.indented-in-emacs
  (:require
   [clojure.pprint]))

den1k avatar Dec 27 '16 23:12 den1k

This is really annoying, as half my colleagues uses Emacs, and our PRs are constantly fighting about this and I have to remember to manually undo these formatting changes 😭

Is there any workaround, or any chance there will ever be some resolution? Thank you!

holyjak avatar Jun 18 '24 16:06 holyjak

Yes, in the next version of Cursive I'm going to rewrite the formatter to be (by default, at least) completely compatible with cljfmt, and to use its configuration style. So this should be fixable then, assuming cljfmt can also use the emacs style.

cursive-ghost avatar Jun 22 '24 03:06 cursive-ghost

Awesome! Do you have any estimate of when that might be done?

holyjak avatar Jun 22 '24 14:06 holyjak

Not really, but hopefully on the timescale of a month or so for the EAP. cljfmt is relatively simple but I'll have to test it on a lot of code to ensure complete compatibility.

cursive-ghost avatar Jun 23 '24 08:06 cursive-ghost

💥 Bump! 💥

This is still a daily issue within our organisation.

It wastes more of my time to go back and manually reformat requires than it does to automatically include references whilst I'm coding elsewhere in a namespace. 🙁

Respectfully: Any chance this issue could be given a higher priority?

scottlowe avatar May 08 '25 12:05 scottlowe

FWIW if I tick One space list indent under Settings > Editor > Code Style > Clojure then ns forms get formatted per the Emacs style in the OP.

imrekoszo avatar Nov 13 '25 18:11 imrekoszo

Right, but that applies to all forms so it is very heavy handed.

holyjak avatar Nov 15 '25 19:11 holyjak