Class CodeFormattingOptions
- Namespace
- RDCore.SDK.Formatting
- Assembly
- RDCore.SDK.dll
What a formatting engine is told to do (SdkFormattingOptions is where a user says it): how deep to indent, what to align, and what the editing assists do.
public sealed record CodeFormattingOptions : IEquatable<CodeFormattingOptions>
- Inheritance
-
CodeFormattingOptions
- Implements
- Inherited Members
Remarks
The first group of settings is Rubberduck's indenter, with the names and meanings its settings have, which are the Smart Indenter's for the most part: a setting means here what it means there (SdkFormattingOptions is where a user says them). The second group is RDCore's own: what formats as the user types, and what completes as they do.
The indentation is made of spaces, IndentSpaces of them for a level.
Fields
MaximumColumn
The largest AlignDimColumn and EndOfLineCommentColumnSpaceAlignment.
public const int MaximumColumn = 100
Field Value
MaximumIndentSpaces
The largest IndentSpaces.
public const int MaximumIndentSpaces = 32
Field Value
MaximumLinesBetweenProcedures
The largest LinesBetweenProcedures.
public const int MaximumLinesBetweenProcedures = 2
Field Value
Properties
AlignCommentsWithCode
Whether a comment on a line of its own is indented as the code that follows it.
public bool AlignCommentsWithCode { get; init; }
Property Value
AlignContinuations
Whether the lines a statement continues onto are aligned with each other.
public bool AlignContinuations { get; init; }
Property Value
AlignDimColumn
The column the As clauses of declarations are aligned in, from 0 to MaximumColumn.
public int AlignDimColumn { get; init; }
Property Value
AlignDims
Whether the As clauses of consecutive declarations are aligned in a column.
public bool AlignDims { get; init; }
Property Value
CompleteBlocks
Whether pressing Enter after a block opener that has no closer inserts the closer, and leaves the caret in the indented body.
public bool CompleteBlocks { get; init; }
Property Value
Default
The options a user who set nothing has.
public static CodeFormattingOptions Default { get; }
Property Value
EmptyLineHandlingMethod
What is done with the lines that have nothing on them.
public EmptyLineHandlingMethod EmptyLineHandlingMethod { get; init; }
Property Value
EndOfLineCommentColumnSpaceAlignment
The column a comment at the end of a line is aligned in when EndOfLineCommentStyle is AlignInColumn, from 0 to MaximumColumn.
public int EndOfLineCommentColumnSpaceAlignment { get; init; }
Property Value
EndOfLineCommentStyle
Where a comment at the end of a line that has code goes.
public EndOfLineCommentStyle EndOfLineCommentStyle { get; init; }
Property Value
ForceCompilerDirectivesInColumn1
Whether the lines of conditional compilation (#If, #ElseIf, #Else, #End If, #Const) go in the first column.
public bool ForceCompilerDirectivesInColumn1 { get; init; }
Property Value
ForceDebugAssertInColumn1
Whether Debug.Assert goes in the first column.
public bool ForceDebugAssertInColumn1 { get; init; }
Property Value
ForceDebugPrintInColumn1
Whether Debug.Print goes in the first column.
public bool ForceDebugPrintInColumn1 { get; init; }
Property Value
ForceDebugStatementsInColumn1
Whether every Debug statement (Print and Assert) and Stop goes in the first column, whatever is set for each.
public bool ForceDebugStatementsInColumn1 { get; init; }
Property Value
ForceStopInColumn1
Whether Stop goes in the first column.
public bool ForceStopInColumn1 { get; init; }
Property Value
ForcesDebugAssertInColumn1
Whether Debug.Assert goes in the first column: ForceDebugAssertInColumn1, or ForceDebugStatementsInColumn1.
public bool ForcesDebugAssertInColumn1 { get; }
Property Value
ForcesDebugPrintInColumn1
Whether Debug.Print goes in the first column: ForceDebugPrintInColumn1, or ForceDebugStatementsInColumn1 which says it of all of them.
public bool ForcesDebugPrintInColumn1 { get; }
Property Value
ForcesStopInColumn1
Whether Stop goes in the first column: ForceStopInColumn1, or ForceDebugStatementsInColumn1.
public bool ForcesStopInColumn1 { get; }
Property Value
FormatOnType
Whether the line just finished is formatted, and the new one indented, when Enter is pressed.
public bool FormatOnType { get; init; }
Property Value
GroupRelatedProperties
Whether the Property Get, Let and Set of a property are kept together, in that order, one after another.
public bool GroupRelatedProperties { get; init; }
Property Value
IgnoreEmptyLinesInFirstBlocks
Whether the empty lines inside the first comment block and the first declaration block are ignored when those blocks are found.
public bool IgnoreEmptyLinesInFirstBlocks { get; init; }
Property Value
IgnoreOperatorsInContinuations
Whether an operator that begins a continued line is ignored when the continuations are aligned: the operands line up, not the operators.
public bool IgnoreOperatorsInContinuations { get; init; }
Property Value
IndentCase
Whether the Case clauses of a Select Case are indented a level from the Select Case.
public bool IndentCase { get; init; }
Property Value
IndentCompilerDirectives
Whether the code between the lines of conditional compilation is indented a level.
public bool IndentCompilerDirectives { get; init; }
Property Value
IndentEntireProcedureBody
Whether the body of a procedure is indented a level from its Sub, Function or Property line and its End.
public bool IndentEntireProcedureBody { get; init; }
Property Value
IndentEnumTypeAsProcedure
Whether the body of an Enum or a Type is indented a level, as a procedure's is.
public bool IndentEnumTypeAsProcedure { get; init; }
Property Value
IndentFirstCommentBlock
Whether the comments at the top of a module, before its first declaration, are indented a level.
public bool IndentFirstCommentBlock { get; init; }
Property Value
IndentFirstDeclarationBlock
Whether the declarations at the top of a procedure, before its first statement, are indented a level.
public bool IndentFirstDeclarationBlock { get; init; }
Property Value
IndentSpaces
The number of spaces a level of indentation is, from 0 to MaximumIndentSpaces.
public int IndentSpaces { get; init; }
Property Value
LinesBetweenProcedures
The number of empty lines between procedures, from 0 to MaximumLinesBetweenProcedures, when VerticallySpaceProcedures is set.
public int LinesBetweenProcedures { get; init; }
Property Value
PrettyList
Whether a finished line is replaced by the line listed from what it compiled to, as MS-VBA lists it, rather than by what a rule of spacing and casing makes of what was typed.
public bool PrettyList { get; init; }
Property Value
SnippetDimPlacement
Where the Dim a snippet declares goes.
public SnippetDimPlacement SnippetDimPlacement { get; init; }
Property Value
Snippets
Whether completion offers snippets of blocks, with placeholders.
public bool Snippets { get; init; }
Property Value
VerticallySpaceProcedures
Whether the number of empty lines between the procedures of a module is made LinesBetweenProcedures.
public bool VerticallySpaceProcedures { get; init; }