Fork me on GitHub
#emacs
<
2016-09-05
>
chrisetheridge11:09:59

is it possible to tell clojure-mode not to ident after a certain symbol?

chrisetheridge11:09:53

say, for instance, in the following form:

(defc my-thing < something
                             something-else
                             {:could-be :a-map}
  [args]
  (forms))

chrisetheridge11:09:09

I would like to align everything after the <, so that they fall under each other

chrisetheridge11:09:22

so,

something
something-else
{:map :thing}
etc

chrisetheridge11:09:34

the < is not a macro, though. just a plain symbol

jethroksy11:09:11

faced that same issue (using rum too)

jethroksy11:09:16

didn't solve it

chrisetheridge11:09:47

would love to be able to solve it. i’ve been using rum a lot, so i’ve switch to LightTable since it plays nicely with custom structure formatting. but, i do miss the structural editing of emacs

jethroksy12:09:31

perhaps someone on their gitter im would know

caio14:09:17

define-clojure-indentdoes the trick

caio14:09:15

so you can call (define-clojure-indent (<clj-symbol> <property>)), where <clj-symbol> is the symbol you want to indent and <property> can be one of the following (from clojure-mode docs): - defun', meaning indent defun'-style; - an integer N, meaning indent the first N arguments specially like ordinary function arguments and then indent any further arguments like a body; - a function to call just as this function was called. If that function returns nil, that means it doesn't specify the indentation. - a list, which is used by `clojure-backtracking-indent'.

scriptor17:09:17

is there a way to force the stack trace buffer to always appear in a specific window?

hlolli18:09:35

Is there a keybinding in emacs to print docstring of a function in point to the repl (ie. not open another buffer like with C-c C-d d.

cvb19:09:14

not sure, but you always can make your own with something like (cider-insert-in-repl "(doc println)" t)

hlolli19:09:17

nice! thanks