Does cursive do some special resolution of doc strings for def?
I’m trying to make a macro so that the on hover docs for constant defs show the actual value in the doc string automatically
(defmacro def-doc [sym v]
`(def ~(with-meta sym {:doc (str "\n" (pr-str v)) :const true}) ~v))
However when I define this, with a resolve as def so it doesn’t show me undefined symbols, I just get a blank doc resolution
So far I’m manually getting the effectAh, so analysing the code itself? Thanks @cfleming
Unfortunately this won't work with Cursive, unless you're getting the doc in the REPL editor (which hits the live REPL). Cursive generally relies on the source code to provide the doc, and in this case obviously it's not there.