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 sort_requires(&self) -> SortRequiresConfig
pub fn sort_requires(&self) -> SortRequiresConfig
Returns the current sort requires codemod configuration
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
sourcepub fn with_sort_requires(self, sort_requires: SortRequiresConfig) -> Self
pub fn with_sort_requires(self, sort_requires: SortRequiresConfig) -> Self
Returns a new config with the given sort requires configuration