Class SdkFormattingOptions
- Namespace
- RDCore.SDK.Server.Configuration
- Assembly
- RDCore.SDK.dll
The code formatting settings of the platform, bound from appsettings.json and set by a user (Formatting): Rubberduck's indenter
settings, and RDCore's own.
public record SdkFormattingOptions : IEquatable<SdkFormattingOptions>
- Inheritance
-
SdkFormattingOptions
- Implements
- Inherited Members
Remarks
A setting is what CodeFormattingOptions says of the property of the same name, and has its default. The settings are what the platform's formatter is told to do; they take effect with the formatter, which reads them each time it formats, so that a change is the next line's.
IndentSpaces and the tab size of a client's editor are one setting said twice, through the client's configuration: an indentation the user never set is the editor's tab size (FormattingTabSize).
Properties
AlignCommentsWithCode
Whether a comment on a line of its own is indented as the code that follows it.
public bool AlignCommentsWithCode { get; set; }
Property Value
AlignContinuations
Whether the lines a statement continues onto are aligned with each other.
public bool AlignContinuations { get; set; }
Property Value
AlignDimColumn
The column the As clauses of declarations are aligned in, from 0 to MaximumColumn.
[Range(0, 100)]
public int AlignDimColumn { get; set; }
Property Value
AlignDims
Whether the As clauses of consecutive declarations are aligned in a column.
public bool AlignDims { get; set; }
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; set; }
Property Value
EmptyLineHandlingMethod
What is done with the lines that have nothing on them.
public EmptyLineHandlingMethod EmptyLineHandlingMethod { get; set; }
Property Value
EndOfLineCommentColumnSpaceAlignment
The column a comment at the end of a line is aligned in when EndOfLineCommentStyle is AlignInColumn, from 0 to MaximumColumn.
[Range(0, 100)]
public int EndOfLineCommentColumnSpaceAlignment { get; set; }
Property Value
EndOfLineCommentStyle
Where a comment at the end of a line that has code goes.
public EndOfLineCommentStyle EndOfLineCommentStyle { get; set; }
Property Value
ForceCompilerDirectivesInColumn1
Whether the lines of conditional compilation (#If, #ElseIf, #Else, #End If, #Const) go in the first column.
public bool ForceCompilerDirectivesInColumn1 { get; set; }
Property Value
ForceDebugAssertInColumn1
Whether Debug.Assert goes in the first column.
public bool ForceDebugAssertInColumn1 { get; set; }
Property Value
ForceDebugPrintInColumn1
Whether Debug.Print goes in the first column.
public bool ForceDebugPrintInColumn1 { get; set; }
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; set; }
Property Value
ForceStopInColumn1
Whether Stop goes in the first column.
public bool ForceStopInColumn1 { get; set; }
Property Value
FormatOnType
Whether the line just finished is formatted, and the new one indented, when Enter is pressed.
public bool FormatOnType { get; set; }
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; set; }
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; set; }
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; set; }
Property Value
IndentCase
Whether the Case clauses of a Select Case are indented a level from the Select Case.
public bool IndentCase { get; set; }
Property Value
IndentCompilerDirectives
Whether the code between the lines of conditional compilation is indented a level.
public bool IndentCompilerDirectives { get; set; }
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; set; }
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; set; }
Property Value
IndentFirstCommentBlock
Whether the comments at the top of a module, before its first declaration, are indented a level.
public bool IndentFirstCommentBlock { get; set; }
Property Value
IndentFirstDeclarationBlock
Whether the declarations at the top of a procedure, before its first statement, are indented a level.
public bool IndentFirstDeclarationBlock { get; set; }
Property Value
IndentSpaces
The number of spaces a level of indentation is, from 0 to MaximumIndentSpaces.
[Range(0, 32)]
public int IndentSpaces { get; set; }
Property Value
LinesBetweenProcedures
The number of empty lines between procedures, from 0 to MaximumLinesBetweenProcedures, when VerticallySpaceProcedures is set.
[Range(0, 2)]
public int LinesBetweenProcedures { get; set; }
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; set; }
Property Value
SnippetDimPlacement
Where the Dim a snippet declares goes.
public SnippetDimPlacement SnippetDimPlacement { get; set; }
Property Value
Snippets
Whether completion offers snippets of blocks, with placeholders.
public bool Snippets { get; set; }
Property Value
VerticallySpaceProcedures
Whether the number of empty lines between the procedures of a module is made LinesBetweenProcedures.
public bool VerticallySpaceProcedures { get; set; }
Property Value
Methods
ToOptions()
The options these settings say, with a number kept to the limits of its setting.
public CodeFormattingOptions ToOptions()