Format
- class Format
Description
Formatter options for Syside
Members defined in
Format(16 members)RWOptions for binary ends formatting:
RWOptions for declarations.
RWOptions for declaration formatting.
RWChoose between
{}and;when formatting empty children blocks:RWOptions for keyword formatting, switching between keywords and tokens, or omitting keywords where possible.
RWLine ends to enforce in formatted documents.
RWFormatter visual line-width limit.
RWWhether to treat
CommentandDocumentationbodies as Markdown.RWWhether to append a note with the package name to the closing bracket.
RWOptions for expression parentheses formatting:
RWWhether to strip quotes from quoted identifiers where possible.
RWOptions for printing synthetic elements.
RWNumber of spaces for tabs if using space indentation.
RWIndent using tabs instead of spaces.
RWOptions for trailing comma placement.
Attributes
- property binary: syside.conf.BinaryEndsFormat
Options for binary ends formatting:
always: binary ends are printed as binary declarationnever: binary ends are printed as nary declaration
- property breaks: syside.conf.BreakOptions
Options for declarations.
- property decl: syside.conf.DeclFormat
Options for declaration formatting.
- property empty_brackets: syside.conf.FormatPreserved[syside.conf.AlwaysNever]
Choose between
{}and;when formatting empty children blocks:always: empty blocks are always formatted as{}never: empty blocks are always formatted as a trailing;
Note that bodies with notes on lines below the opening bracket
{will be treated as having children.
- property keywords: syside.conf.KeywordOptions
Options for keyword formatting, switching between keywords and tokens, or omitting keywords where possible.
- property line_ending: syside.conf.LineEnding | None
Line ends to enforce in formatted documents.
When set to
auto, and the document has mixed line ends, choice betweenlfandcrlfis an implementation detail. Documents without line ends default tolf.nativeselects line ending based on the platform Syside runs on,lfon Unix, andcrlfon Windows.
- property line_width: int
Formatter visual line-width limit.
Formatter will attempt to fit formatted lines into this number of visual columns.
- property markdown: bool
Whether to treat
CommentandDocumentationbodies as Markdown.Markdown will preserve whitespace at the end of the lines since it is significant, otherwise it will be trimmed. This does not reformat paragraphs.
- property package_closing_note: bool
Whether to append a note with the package name to the closing bracket.
When enabled, packages with a closing bracket on a different line will have a note attached:
package myPackage { package P; } // package myPackage
- property parentheses: syside.conf.ParenthesesFormat
Options for expression parentheses formatting:
always: expression is printed with parenthesesnever: expression is printed without parentheseson-break: expression is printed with parentheses only if it breaks
- property strip_unnecessary_quotes: bool
Whether to strip quotes from quoted identifiers where possible.
If true, quotes will be stripped from identifiers that have no restricted characters and do not clash with language keywords.
- property synth: syside.conf.SynthOptions
Options for printing synthetic elements.
- property tab_width: int | None
Number of spaces for tabs if using space indentation.
Takes priority over editor settings if set. Defaults to
4otherwise.
- property tabs: bool | None
Indent using tabs instead of spaces.
Takes priority over editor settings if set. Defaults to
falseotherwise.
- property trailing_comma: syside.conf.CommaOptions
Options for trailing comma placement.
Methods