Fork me on GitHub

what do people do to copy multiple consecutive s-expressions? I've mostly been using ya( or yi( but if you give those a prefix they will match ever greater surrounding forms, rather than consecutive forms...


@plexus I use y3L which copies 3 sexps, where L maps to evil-cp-forward-sp in my spacemacs config


I just discovered lsp-mode and it seems attractive, do you use it with spacemacs or emacs in general for clojure developpment?


Small question about formatting: Is it possible to change the way code is being formatted? I am not quite sure which plugin is responsible for it, so I don't know where to look it up. For example:

(defui Actual
  static om/IQuery
  (query [this]
         []))  ;; <-- too many spaces

(defui Expected
  static om/IQuery
  (query [this]
    []))  ;; should treat it the same as a function definition
I want the second version. In Cursive it is possible to tell the IDE how the macro, which is not known to the IDE, should be interpreted in terms of indentation.


Indentation in clojure-mode is controlled by changing clojure-indent-style - read description of that function and CIDER documentation for more. But I would recommend keeping default value which I think is 'always-align'. And then when you press , fl - it would nicely realign things that are misaligned. You can also specifically make different forms to align differently but that will probably make lein cljfmt and similar tools to yell at you.

(dolist (form '(re-frame.core/reg-sub
  (put-clojure-indent form 1))


I’d say just don’t worry about it and simply use the defaults. Conventions exists for reasons. In your example it could be something like:



I totally agree that one should stick to the conventions, but I think this formatting is not really correct. Cursive handles it the way I described it and this is what I like. Also it would be great to change it just to follow the same style guide. In our team we have users using Emacs and others use IntelliJ. When use auto-formattinc, lines are touched which just have not been changed -- just the configured indentation was different between these IDEs...