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