The docs says that format() "Defaults to current selection in visual mode":
|
| | range | `nil\|table` | Range to format. Table must contain `start` and `end` keys with {row, col} tuples using (1,0) indexing. Defaults to current selection in visual mode | |
Yet, it is unclear on how to format a visual selection.