Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indent Mode not formatting correctly #29

Open
colonelrascals opened this issue Aug 14, 2018 · 1 comment
Open

Indent Mode not formatting correctly #29

colonelrascals opened this issue Aug 14, 2018 · 1 comment

Comments

@colonelrascals
Copy link

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)))))))))
@colonelrascals
Copy link
Author

Will update with gif of recreation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant