Table of Contents

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

bool

AlignContinuations

Whether the lines a statement continues onto are aligned with each other.

public bool AlignContinuations { get; set; }

Property Value

bool

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

int

AlignDims

Whether the As clauses of consecutive declarations are aligned in a column.

public bool AlignDims { get; set; }

Property Value

bool

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

bool

EmptyLineHandlingMethod

What is done with the lines that have nothing on them.

public EmptyLineHandlingMethod EmptyLineHandlingMethod { get; set; }

Property Value

EmptyLineHandlingMethod

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

int

EndOfLineCommentStyle

Where a comment at the end of a line that has code goes.

public EndOfLineCommentStyle EndOfLineCommentStyle { get; set; }

Property Value

EndOfLineCommentStyle

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

bool

ForceDebugAssertInColumn1

Whether Debug.Assert goes in the first column.

public bool ForceDebugAssertInColumn1 { get; set; }

Property Value

bool

ForceDebugPrintInColumn1

Whether Debug.Print goes in the first column.

public bool ForceDebugPrintInColumn1 { get; set; }

Property Value

bool

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

bool

ForceStopInColumn1

Whether Stop goes in the first column.

public bool ForceStopInColumn1 { get; set; }

Property Value

bool

FormatOnType

Whether the line just finished is formatted, and the new one indented, when Enter is pressed.

public bool FormatOnType { get; set; }

Property Value

bool

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

bool

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

bool

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

bool

IndentCase

Whether the Case clauses of a Select Case are indented a level from the Select Case.

public bool IndentCase { get; set; }

Property Value

bool

IndentCompilerDirectives

Whether the code between the lines of conditional compilation is indented a level.

public bool IndentCompilerDirectives { get; set; }

Property Value

bool

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

bool

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

bool

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

bool

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

bool

IndentSpaces

The number of spaces a level of indentation is, from 0 to MaximumIndentSpaces.

[Range(0, 32)]
public int IndentSpaces { get; set; }

Property Value

int

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

int

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

bool

SnippetDimPlacement

Where the Dim a snippet declares goes.

public SnippetDimPlacement SnippetDimPlacement { get; set; }

Property Value

SnippetDimPlacement

Snippets

Whether completion offers snippets of blocks, with placeholders.

public bool Snippets { get; set; }

Property Value

bool

VerticallySpaceProcedures

Whether the number of empty lines between the procedures of a module is made LinesBetweenProcedures.

public bool VerticallySpaceProcedures { get; set; }

Property Value

bool

Methods

ToOptions()

The options these settings say, with a number kept to the limits of its setting.

public CodeFormattingOptions ToOptions()

Returns

CodeFormattingOptions