https://kotlinlang.org logo
Title
s

Stylianos Gakis

07/13/2022, 9:07 AM
I’m writing a block comment over a function and would like to use the nice formatting we get inside IntelliJ. I got a table right now which looks something like this
* | name | required | description | default value | example |
 * | :--- | :--- | :--- | :--- | :--- |
 * | name | ✅ | desc | ❌ | example |
It renders as I would expect, with the items left-aligned and everything, but everything is way too close to each other. Is there a way in this formatter to make it look like an actual table? Preferably keep some dividers vertically and horizontally across the items, but if not at least some way to force more space between the items.
a

AndreyVanDenHaag

07/13/2022, 3:07 PM
you can use padStart (or padEnd) to align the values
s

Stylianos Gakis

07/13/2022, 3:15 PM
I’m in the context of writing a block comment. How would I access such functions from in there? I don’t believe that is possible.
a

AndreyVanDenHaag

07/13/2022, 9:53 PM
sorry, I missed that
s

Stylianos Gakis

07/13/2022, 10:01 PM
No problem 😊