pub struct ConfigurationBuilder { /* private fields */ }Expand description
Markdown formatting configuration builder.
§Example
use dprint_plugin_markdown::configuration::*;
let config = ConfigurationBuilder::new()
.line_width(80)
.build();Implementations§
source§impl ConfigurationBuilder
impl ConfigurationBuilder
sourcepub fn build(&self) -> Configuration
pub fn build(&self) -> Configuration
Gets the final configuration that can be used to format a file.
sourcepub fn global_config(&mut self, global_config: GlobalConfiguration) -> &mut Self
pub fn global_config(&mut self, global_config: GlobalConfiguration) -> &mut Self
Set the global configuration.
sourcepub fn line_width(&mut self, value: u32) -> &mut Self
pub fn line_width(&mut self, value: u32) -> &mut Self
The width of a line the printer will try to stay under. Note that the printer may exceed this width in certain cases. Default: 80
sourcepub fn new_line_kind(&mut self, value: NewLineKind) -> &mut Self
pub fn new_line_kind(&mut self, value: NewLineKind) -> &mut Self
The kind of newline to use.
Default: NewLineKind::LineFeed
sourcepub fn text_wrap(&mut self, value: TextWrap) -> &mut Self
pub fn text_wrap(&mut self, value: TextWrap) -> &mut Self
The kind of text wrapping to use.
Default: TextWrap::Maintain
sourcepub fn emphasis_kind(&mut self, value: EmphasisKind) -> &mut Self
pub fn emphasis_kind(&mut self, value: EmphasisKind) -> &mut Self
The character to use for emphasis/italics.
Default: EmphasisKind::Underscores
sourcepub fn strong_kind(&mut self, value: StrongKind) -> &mut Self
pub fn strong_kind(&mut self, value: StrongKind) -> &mut Self
The character to use for strong emphasis/bold.
Default: StrongKind::Underscores
sourcepub fn unordered_list_kind(&mut self, value: UnorderedListKind) -> &mut Self
pub fn unordered_list_kind(&mut self, value: UnorderedListKind) -> &mut Self
The character to use for lists.
Default: UnorderedListKind::Dashes
sourcepub fn ignore_directive(&mut self, value: &str) -> &mut Self
pub fn ignore_directive(&mut self, value: &str) -> &mut Self
The directive used to ignore a line.
Default: dprint-ignore
sourcepub fn ignore_file_directive(&mut self, value: &str) -> &mut Self
pub fn ignore_file_directive(&mut self, value: &str) -> &mut Self
The directive used to ignore a file.
Default: dprint-ignore-file
sourcepub fn ignore_start_directive(&mut self, value: &str) -> &mut Self
pub fn ignore_start_directive(&mut self, value: &str) -> &mut Self
The directive used to mark start of ignored section.
Default: dprint-ignore-start
sourcepub fn ignore_end_directive(&mut self, value: &str) -> &mut Self
pub fn ignore_end_directive(&mut self, value: &str) -> &mut Self
The directive used to mark end of ignored section.
Default: dprint-ignore-end