pub struct MD060Config {
pub enabled: bool,
pub style: String,
pub max_width: LineLength,
pub column_align: ColumnAlign,
pub column_align_header: Option<ColumnAlign>,
pub column_align_body: Option<ColumnAlign>,
pub loose_last_column: bool,
}Fields§
§enabled: bool§style: String§max_width: LineLengthMaximum table width before auto-switching to compact mode.
0(default): Inherit from MD013’sline-lengthsetting- Non-zero: Explicit max width threshold
When a table’s aligned width would exceed this limit, MD060 automatically uses compact formatting instead (minimal padding) to prevent excessively long lines. This matches the behavior of Prettier’s table formatting.
§Examples
[MD013]
line-length = 100
[MD060]
style = "aligned"
max-width = 0 # Uses MD013's line-length (100)[MD060]
style = "aligned"
max-width = 120 # Explicit threshold, independent of MD013column_align: ColumnAlignControls how cell text is aligned within the padded column width.
auto(default): Use alignment indicators from delimiter row (:---,:---:,---:)left: Force all columns to left-align textcenter: Force all columns to center textright: Force all columns to right-align text
Only applies when style = "aligned" or style = "aligned-no-space".
§Examples
[MD060]
style = "aligned"
column-align = "center" # Center all cell textcolumn_align_header: Option<ColumnAlign>Controls alignment specifically for the header row.
When set, overrides column-align for the header row only.
If not set, falls back to column-align.
§Examples
[MD060]
style = "aligned"
column-align-header = "center" # Center header text
column-align-body = "left" # Left-align body textcolumn_align_body: Option<ColumnAlign>Controls alignment specifically for body rows (non-header, non-delimiter).
When set, overrides column-align for body rows only.
If not set, falls back to column-align.
§Examples
[MD060]
style = "aligned"
column-align-header = "center" # Center header text
column-align-body = "left" # Left-align body textloose_last_column: boolWhen enabled, the last column in body rows is not padded to match the header width.
This is useful for tables where the last column contains descriptions or other variable-length content. The header and delimiter rows remain fully aligned, but body rows can have shorter or longer last columns.
Only applies when style = "aligned" or style = "aligned-no-space".
§Examples
[MD060]
style = "aligned"
loose-last-column = trueResult:
| Name | Status | Description |
|--------|----------|-------------|
| Foo | Enabled | Short |
| Bar | Disabled | A much longer description that would waste space if padded |Trait Implementations§
Source§impl Clone for MD060Config
impl Clone for MD060Config
Source§fn clone(&self) -> MD060Config
fn clone(&self) -> MD060Config
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MD060Config
impl Debug for MD060Config
Source§impl Default for MD060Config
impl Default for MD060Config
Source§impl<'de> Deserialize<'de> for MD060Config
impl<'de> Deserialize<'de> for MD060Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for MD060Config
impl PartialEq for MD060Config
Source§impl RuleConfig for MD060Config
impl RuleConfig for MD060Config
Source§impl Serialize for MD060Config
impl Serialize for MD060Config
impl StructuralPartialEq for MD060Config
Auto Trait Implementations§
impl Freeze for MD060Config
impl RefUnwindSafe for MD060Config
impl Send for MD060Config
impl Sync for MD060Config
impl Unpin for MD060Config
impl UnwindSafe for MD060Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more