The wrapping section of the wiki recommends using
fmt from coreutils to format paragraphs, which works fine but fails to properly indent text such as Doxygen comments unless you specify the correct
--prefix option somehow.
There are several ways to fix this of course, but for me, the easiest solution was to write a “smarter” fmt clone.
It’s a drop-in replacement written in Python with no dependencies, so all you have to do is to use:
map global normal = '|dfmt -w $kak_opt_autowrap_column<ret>'
in your kakrc.
Hope you’ll find it useful!