Open jacobemcken opened 2 years ago
Since Clojure is a LISP and people define new type of forms at will, it can be quite tricky to identify a doc string. But the most common ones can be covered at least.
I've given some though to this and I'm a little wary of adding something as open as "wrapping any string" and in Python it's also caused problems like #293, though I do have ideas on how to solve that.
The most common cases for doc strings in defn
& ns
can probably be covered in a hacky way.
For anything else, in the next release it will be possible to wrap any lines that are selected (not just comments), so that might be enough for those.
The Clojure programming language offers the programmer to write so-called "doc strings" to document a specific function or namespace. At least on the surface it seems similar to Python doc strings which as far as I can tell is somewhat supported in Rewrap already?
In Clojure a doc string could look like the following:
Doc strings are ALWAYS put in double quotes (
"
), like any string. The only variant is that it can stretch multiple lines.Of course, if Rewrap worked on Clojure doc strings, they could look like the following after having used Alt+q on the two doc strings: