Hi Martijn,
Love the package, it's been incredibly useful.
I'm encountering a problem with custom legends. When adding a legend with tm_add_legend(), the legend.format = list() argument doesn't seem to actually affect the printed legend, although no errors come up. I was unable to find any examples of using 'legend.format' within "tm_add_legend()' so I could just be missing something.
Minrep (stealing your code from a different issue):
data(World)
qtm(World, fill = "HPI") +
tm_add_legend("fill",
labels = letters[1:5],
col = rainbow(5),
title = "My Legend",
legend.format = list(legend.frame = "black", legend.bg.color = "green"))
gives me:

To be honest, I don't know why I added legend.format to tm_add_legend, because legend format options are specific per map, not per legend.
qtm(World, fill = "HPI") +
tm_add_legend("fill",
labels = letters[1:5],
col = rainbow(5),
title = "My Legend") +
tm_legend(frame = "black", bg.color = "green")

Oops, thanks. I should've tried that to begin with!
@mtennekes Maybe it is a good idea to remove the legend.format argument?
Well, turns out that legend.format has a different purpose, namely the styling of the legend labels (e.g. legend.format = list(text.align = "right")), rather than its layout. So the documentation was wrong:-) It's fixed now.
Most helpful comment
@mtennekes Maybe it is a good idea to remove the
legend.formatargument?