Hi, I started this as a question, but I figured out a solution before posting. This is a small utility command that wraps long lines of comments in different languages (using different comment prefixes).
Maybe someone else would find it useful, so I thought I’d post it here:
It uses fmt with the --prefix option to format (only) lines with the comment prefix for the current language. It also uses $kak_opt_autowrap_column to set the width automatically.