{"action":"created","issue":{"url":"https://api.github.com/repos/clojure-emacs/cider/issues/747","labels_url":"https://api.github.com/repos/clojure-emacs/cider/issues/747/labels{/name}","comments_url":"https://api.github.com/repos/clojure-emacs/cider/issues/747/comments","events_url":"https://api.github.com/repos/clojure-emacs/cider/issues/747/events","html_url":"https://github.com/clojure-emacs/cider/issues/747","id":40992469,"number":747,"title":"customize indentation","user":{"login":"johnbendi","id":1025834,"avatar_url":"https://avatars.githubusercontent.com/u/1025834?v=3","gravatar_id":"","url":"https://api.github.com/users/johnbendi","html_url":"https://github.com/johnbendi","followers_url":"https://api.github.com/users/johnbendi/followers","following_url":"https://api.github.com/users/johnbendi/following{/other_user}","gists_url":"https://api.github.com/users/johnbendi/gists{/gist_id}","starred_url":"https://api.github.com/users/johnbendi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnbendi/subscriptions","organizations_url":"https://api.github.com/users/johnbendi/orgs","repos_url":"https://api.github.com/users/johnbendi/repos","events_url":"https://api.github.com/users/johnbendi/events{/privacy}","received_events_url":"https://api.github.com/users/johnbendi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-08-24T02:09:00Z","updated_at":"2015-11-26T01:36:00Z","closed_at":"2014-08-24T14:16:10Z","body":"How can I customize the indentation behavior of cider to give me something like :\r\n\r\n```lisp\r\n(dom/div nil\r\n  (dom/p nil))\r\n```\r\nrather than :\r\n\r\n```lisp\r\n(dom/div nil\r\n         (dom/p nil))\r\n```\r\nIs there a way of making cider aware of it's context when indenting, something I can easiily customize?"},"comment":{"url":"https://api.github.com/repos/clojure-emacs/cider/issues/comments/159775374","html_url":"https://github.com/clojure-emacs/cider/issues/747#issuecomment-159775374","issue_url":"https://api.github.com/repos/clojure-emacs/cider/issues/747","id":159775374,"user":{"login":"danielsz","id":859131,"avatar_url":"https://avatars.githubusercontent.com/u/859131?v=3","gravatar_id":"","url":"https://api.github.com/users/danielsz","html_url":"https://github.com/danielsz","followers_url":"https://api.github.com/users/danielsz/followers","following_url":"https://api.github.com/users/danielsz/following{/other_user}","gists_url":"https://api.github.com/users/danielsz/gists{/gist_id}","starred_url":"https://api.github.com/users/danielsz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielsz/subscriptions","organizations_url":"https://api.github.com/users/danielsz/orgs","repos_url":"https://api.github.com/users/danielsz/repos","events_url":"https://api.github.com/users/danielsz/events{/privacy}","received_events_url":"https://api.github.com/users/danielsz/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T01:36:00Z","updated_at":"2015-11-26T01:36:00Z","body":"@Malabarba Thank you.\r\n\r\nIn the case of the dom tags provided by Om, it is a bit daunting.\r\nThe tags are defined in a vector: \r\n```clojure\r\n(def tags\r\n  '[a\r\n    abbr\r\n    address\r\n    area\r\n    ...])\r\n```\r\n\r\nThen macros transform those:\r\n\r\n```clojure\r\n(defn ^:private gen-react-dom-fn [tag]\r\n  `(defn ~tag [opts# & children#]\r\n     (.apply ~(symbol \"js\" (str \"React.DOM.\" (name tag))) nil\r\n       (cljs.core/into-array\r\n         (cons opts# (cljs.core/map om.util/force-children children#))))))\r\n\r\n(defmacro ^:private gen-react-dom-fns []\r\n  `(do\r\n     ~@(clojure.core/map gen-react-dom-fn tags)))\r\n```\r\n\r\nI'm not sure how to proceed."}}