Skip to content

Add config for and/or retain file formatting, for comments and alignment #128

@kevinmershon

Description

@kevinmershon

I've loved using clojure-mcp but one point of annoyance has been that after any edit to a section of a file I have to go and manually re-run CIDER's clojure-align operation to fix vertical alignments of let expressions, destructures, and maps.

I would love it if there were a config option or default to keeping forms vertically aligned for readability.

e.g.

Actual

(let [short-var true
      much-longer-var-name-that-should-force-alignment true

      some-map {:a 1
                :alphabetical 2}]
    ...)

Expected

(let [short-var                                        true
      much-longer-var-name-that-should-force-alignment true

      some-map {:a            1
                :alphabetical 2}]
    ...)

Similarly for comments, a real snippet where I had manually aligned a comment and then clojure-mcp undid it:

Actual

         (filter (fn [[_k v]]
                   (or (= type-kw (:document/type v)) ;; v1
                       (= type-kw (:type-kw v))))) ;; v0

Expected

         (filter (fn [[_k v]]
                   (or (= type-kw (:document/type v)) ;; v1
                       (= type-kw (:type-kw v)))))    ;; v0

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