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

source

pub fn new() -> Self

Constructs a new configuration builder.

source

pub fn build(&self) -> Configuration

Gets the final configuration that can be used to format a file.

source

pub fn global_config(&mut self, global_config: GlobalConfiguration) -> &mut Self

Set the global configuration.

source

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

source

pub fn new_line_kind(&mut self, value: NewLineKind) -> &mut Self

The kind of newline to use. Default: NewLineKind::LineFeed

source

pub fn text_wrap(&mut self, value: TextWrap) -> &mut Self

The kind of text wrapping to use. Default: TextWrap::Maintain

source

pub fn emphasis_kind(&mut self, value: EmphasisKind) -> &mut Self

The character to use for emphasis/italics. Default: EmphasisKind::Underscores

source

pub fn strong_kind(&mut self, value: StrongKind) -> &mut Self

The character to use for strong emphasis/bold. Default: StrongKind::Underscores

source

pub fn unordered_list_kind(&mut self, value: UnorderedListKind) -> &mut Self

The character to use for lists. Default: UnorderedListKind::Dashes

source

pub fn ignore_directive(&mut self, value: &str) -> &mut Self

The directive used to ignore a line. Default: dprint-ignore

source

pub fn ignore_file_directive(&mut self, value: &str) -> &mut Self

The directive used to ignore a file. Default: dprint-ignore-file

source

pub fn ignore_start_directive(&mut self, value: &str) -> &mut Self

The directive used to mark start of ignored section. Default: dprint-ignore-start

source

pub fn ignore_end_directive(&mut self, value: &str) -> &mut Self

The directive used to mark end of ignored section. Default: dprint-ignore-end

source

pub fn deno(&mut self) -> &mut Self

Trait Implementations§

source§

impl Default for ConfigurationBuilder

source§

fn default() -> ConfigurationBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.