Skip to content

Indent Mode not formatting correctly  #29

@colonelrascals

Description

@colonelrascals

Indent Mode does not seem to recognize nested parens.

Example:

Expected output:

(defn sort-parts
  [work]
  (lazy-seq
   (loop [[part & parts] work]
     (if-let [[pivot & xs] (seq part)]
       (let [smaller? #(< % pivot)]
         (recur list*
                (filler smaller? xs)
                pivot
                (remove smaller? xs)
                parts)))
     (when-let [[x & parts] parts]
       (cons x (sort-parts parts))))))

Indent Mode output:

(defn sort-parts 
  [work]
  (lazy-seq
    (loop [[part & parts] work]
      (if-let [[pivot & xs] (seq part)]
        (let [smaller? #(< % pivot)]
          (recur list*
              (filler smaller? xs)
              pivot
              (remove smaller? xs)
              parts
            (when-let [[x & parts] parts]
              (cons x (sort-parts parts)))))))))

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