pub struct Config {Show 20 fields
pub indent_width: usize,
pub line_length: usize,
pub keyword_case: KeywordCase,
pub normalize_keywords: bool,
pub indent_fypp: bool,
pub indent_module: bool,
pub named_ends: bool,
pub align_declarations: bool,
pub align_comments: bool,
pub compact_declarations: bool,
pub compact_use: bool,
pub unicode_to_ascii: bool,
pub rewrap_comments: bool,
pub rewrap_code: bool,
pub space_after_comment: bool,
pub collapse_double_spaces: bool,
pub keyword_paren_space: bool,
pub fypp_list_commas: bool,
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: boolNormalize compound keywords (enddo -> end do).
indent_fypp: boolIndent Fypp preprocessor blocks.
indent_module: boolIndent body of module/program.
named_ends: boolAdd 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: boolRemove blank lines between consecutive declarations.
compact_use: boolRemove blank lines between consecutive use statements.
unicode_to_ascii: boolReplace Unicode Greek/math symbols with LaTeX in comments.
rewrap_comments: boolRe-wrap long comments at line-length.
rewrap_code: boolRe-wrap long code lines at line-length.
space_after_comment: boolEnsure space after ! in regular comments.
collapse_double_spaces: boolCollapse double spaces to single in code regions.
keyword_paren_space: boolAdd space between keywords and ( (if, call, allocate, etc.).
fypp_list_commas: boolNormalize comma spacing in Fypp ‘[…]’ list arguments.
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