You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to implement this for Clojure through CIDER, instead of having to specify indentation for special forms and macros with define-clojure-indent?
This is doable, but I'm not sure how useful it will be. There was a ticket about this for CIDER a while back, but I think I closed it when we added support for indentation metadata. Guessing the indentation from some param names simply doesn't feel very reliable to me. But in general implementing this should be rather simple - when you evaluate some macro, we'd inspect its params and add some indentation metadata automatically if we find some "special" param names.
Activity
bbatsov commentedon Jul 26, 2016
This is doable, but I'm not sure how useful it will be. There was a ticket about this for CIDER a while back, but I think I closed it when we added support for indentation metadata. Guessing the indentation from some param names simply doesn't feel very reliable to me. But in general implementing this should be rather simple - when you evaluate some macro, we'd inspect its params and add some indentation metadata automatically if we find some "special" param names.
Malabarba commentedon Jul 26, 2016
I implemented something like that when I was implementing the indentation metadata. In the end, I pulled it out because it just wasn't reliable.
xiongtx commentedon Jul 26, 2016
👍 Great that it's been considered! Yes, the
defrecordfamily is weird. I'll close this then.