emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
borkdude 2021-05-01T14:49:10.192300Z

Which clojure emacs tool can align EDN files like this: https://gist.github.com/mikeananev/c87c1596aed50b7bb095a816f6921737 So the vals on the right are aligned on the same column?

practicalli-john 2021-05-01T15:03:21.192400Z

I thought it was just setting options in clojure-mode, one or both of these?

clojure-indent-style 'align-arguments                
clojure-align-forms-automatically t

dakra 2021-05-01T17:02:35.193200Z

I think the command to manually format like that is clojure-align (Bound to C-c SPC by default)

1
borkdude 2021-05-01T19:04:44.195900Z

I have tried that but it doesn't seem to align all the keys and values in one map at the same column. I expect the vals from :enter and :leave to go more to the right because of the following key/val Am I misunderstanding how it should work?

dpsutton 2021-05-01T19:17:40.197300Z

I think the line breaks introduce new alignments. So that if you have long keys you can put a line break so that other keys don’t get crazy indentation

dpsutton 2021-05-01T19:17:46.197600Z

It might be configurable

dpsutton 2021-05-01T19:20:13.197800Z

(defcustom clojure-align-separator clojure--align-separator-newline-regexp
  "The separator that will be passed to `align-region' when performing vertical alignment."
  :package-version '(clojure-mode . "5.10")
  :type `(choice (const :tag "Make blank lines prevent vertical alignment from happening."
                        ,clojure--align-separator-newline-regexp)
                 (other :tag "Allow blank lines to happen within a vertically-aligned expression."
                        'entire)))