Fork me on GitHub
#cider
<
2023-05-26
>
mkvlr11:05:06

i have a macro that’s like a def except adding the ability to define var meta not on meta of the name name of the def but also after the name so (def my-var "docstring" {:var :meta} ,,,). Can I teach cider to indent like a def and give it the (italic in my theme) docstring treatment?

OknoLombarda12:05:08

You can change indentation of macro via https://docs.cider.mx/cider/config/indentation.html#dynamic-indentation, e. g.

{:style/indent 1}
As for docstring treatment, I believe you'll have to do it by extending https://github.com/clojure-emacs/clojure-mode#font-locking, like so
(put '>defn 'clojure-doc-string-elt 2)

🙏 2