pub struct Config {Show 27 fields
pub indent_width: usize,
pub line_length: usize,
pub keyword_case: KeywordCase,
pub normalize_keywords: Toggle,
pub indent_fypp: bool,
pub indent_module: bool,
pub named_ends: Toggle,
pub align_declarations: bool,
pub align_comments: bool,
pub compact_declarations: Toggle,
pub compact_use: Toggle,
pub unicode_to_ascii: bool,
pub rewrap_comments: Toggle,
pub rewrap_code: Toggle,
pub space_after_comment: Toggle,
pub collapse_double_spaces: bool,
pub keyword_paren_space: Toggle,
pub fypp_list_commas: Toggle,
pub end_of_line: EndOfLine,
pub modernize_operators: Toggle,
pub enforce_double_colon: Toggle,
pub split_statements: Toggle,
pub align_ampersand: Toggle,
pub align_assignments: Toggle,
pub use_formatting: Toggle,
pub whitespace: WhitespaceConfig,
pub files: FilesConfig,
}Expand description
Configuration for ffmt formatting.
Defaults match MFC’s current style conventions.
Config is loaded from ffmt.toml or [tool.ffmt] in pyproject.toml,
searched upward from the formatted file’s directory.
Fields§
§indent_width: usizeIndentation width in spaces.
line_length: usizeMaximum line length before splitting.
keyword_case: KeywordCaseKeyword case normalization mode.
normalize_keywords: ToggleNormalize compound keywords (enddo -> end do).
indent_fypp: boolIndent Fypp preprocessor blocks.
indent_module: boolIndent body of module/program.
named_ends: ToggleAdd procedure/module name to bare end statements.
align_declarations: boolAlign :: in consecutive declaration blocks.
align_comments: boolAlign !< inline Doxygen comments in declaration blocks.
compact_declarations: ToggleRemove blank lines between consecutive declarations.
compact_use: ToggleRemove blank lines between consecutive use statements.
unicode_to_ascii: boolReplace Unicode Greek/math symbols with LaTeX in comments.
rewrap_comments: ToggleRe-wrap long comments at line-length.
rewrap_code: ToggleRe-wrap long code lines at line-length.
space_after_comment: ToggleEnsure space after ! in regular comments.
collapse_double_spaces: boolCollapse double spaces to single in code regions.
keyword_paren_space: ToggleAdd space between keywords and ( (if, call, allocate, etc.).
fypp_list_commas: ToggleNormalize comma spacing in Fypp ‘[…]’ list arguments.
end_of_line: EndOfLineLine ending normalization: “lf”, “crlf”, or “preserve”.
modernize_operators: ToggleModernize legacy relational operators (.eq. -> ==). Accepts true/false/“preserve”.
enforce_double_colon: ToggleEnforce :: separator in variable declarations. Accepts true/false/“preserve”.
split_statements: ToggleSplit semicolon-separated statements onto separate lines. Accepts true/false/“preserve”.
align_ampersand: ToggleAlign trailing & continuation markers at column limit. Accepts true/false/“preserve”.
align_assignments: ToggleAlign = in consecutive assignment statements. Accepts true/false/“preserve”.
use_formatting: ToggleReformat use-statement imports. “one-per-line” puts each imported name on its own line. Accepts “one-per-line”, false, or “preserve”.
whitespace: WhitespaceConfigWhitespace rules.
files: FilesConfigFile handling.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more