Struct stylua_lib::Config
source · pub struct Config { /* private fields */ }
Expand description
The configuration to use when formatting.
Implementations§
source§impl Config
impl Config
sourcepub fn column_width(&self) -> usize
pub fn column_width(&self) -> usize
Returns the current configured column width
sourcepub fn line_endings(&self) -> LineEndings
pub fn line_endings(&self) -> LineEndings
Returns the current configured line endings
sourcepub fn indent_type(&self) -> IndentType
pub fn indent_type(&self) -> IndentType
Returns the current configured indent type
sourcepub fn indent_width(&self) -> usize
pub fn indent_width(&self) -> usize
Returns the current configured indent width
sourcepub fn quote_style(&self) -> QuoteStyle
pub fn quote_style(&self) -> QuoteStyle
Returns the current configured quote style
sourcepub fn call_parentheses(&self) -> CallParenType
pub fn call_parentheses(&self) -> CallParenType
Returns the current configured call parentheses style
pub fn collapse_simple_statement(&self) -> CollapseSimpleStatement
sourcepub fn with_column_width(self, column_width: usize) -> Self
pub fn with_column_width(self, column_width: usize) -> Self
Returns a new config with the given column width
sourcepub fn with_line_endings(self, line_endings: LineEndings) -> Self
pub fn with_line_endings(self, line_endings: LineEndings) -> Self
Returns a new config with the given line endings
sourcepub fn with_indent_type(self, indent_type: IndentType) -> Self
pub fn with_indent_type(self, indent_type: IndentType) -> Self
Returns a new config with the given indent type
sourcepub fn with_indent_width(self, indent_width: usize) -> Self
pub fn with_indent_width(self, indent_width: usize) -> Self
Returns a new config with the given indent width
sourcepub fn with_quote_style(self, quote_style: QuoteStyle) -> Self
pub fn with_quote_style(self, quote_style: QuoteStyle) -> Self
Returns a new config with the given quote style
sourcepub fn with_no_call_parentheses(self, no_call_parentheses: bool) -> Self
pub fn with_no_call_parentheses(self, no_call_parentheses: bool) -> Self
Returns a new config with the given value for no_call_parentheses
sourcepub fn with_call_parentheses(self, call_parentheses: CallParenType) -> Self
pub fn with_call_parentheses(self, call_parentheses: CallParenType) -> Self
Returns a new config with the given call parentheses type
pub fn with_collapse_simple_statement(
self,
collapse_simple_statement: CollapseSimpleStatement
) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Configwhere
Config: Default,
impl<'de> Deserialize<'de> for Configwhere
Config: Default,
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>,
Deserialize this value from the given Serde deserializer. Read more