46 references to FormattingOptions2
Microsoft.CodeAnalysis.CSharp.Features (9)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
235
if (options.IndentStyle ==
FormattingOptions2
.IndentStyle.Smart)
BraceCompletion\CurlyBraceCompletionService.cs (8)
88
new BraceCompletionFormattingRule(
FormattingOptions2
.IndentStyle.None),
89
new BraceCompletionFormattingRule(
FormattingOptions2
.IndentStyle.Block),
90
new BraceCompletionFormattingRule(
FormattingOptions2
.IndentStyle.Smart),
93
private readonly
FormattingOptions2
.IndentStyle _indentStyle;
96
public BraceCompletionFormattingRule(
FormattingOptions2
.IndentStyle indentStyle)
101
private BraceCompletionFormattingRule(
FormattingOptions2
.IndentStyle indentStyle, CSharpSyntaxFormattingOptions options)
107
public static AbstractFormattingRule ForIndentStyle(
FormattingOptions2
.IndentStyle indentStyle)
247
if (_indentStyle ==
FormattingOptions2
.IndentStyle.Block)
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Indentation\CSharpSmartTokenFormatter.cs (1)
108
_options.IndentStyle !=
FormattingOptions2
.IndentStyle.Smart)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.cs (2)
43
protected override AbstractFormattingRule GetSpecializedIndentationFormattingRule(
FormattingOptions2
.IndentStyle indentStyle)
62
if (options.IndentStyle !=
FormattingOptions2
.IndentStyle.Smart)
Microsoft.CodeAnalysis.Features (5)
Options\EditorConfig\EditorConfigOptionsEnumerator.cs (2)
35
yield return (WorkspacesResources.Core_EditorConfig_Options,
FormattingOptions2
.EditorConfigOptions);
40
yield return ("unsupported",
FormattingOptions2
.UndocumentedOptions);
Wrapping\AbstractCodeActionComputer.cs (2)
84
=> GetIndentationAfterAsync(nodeOrToken,
FormattingOptions2
.IndentStyle.Smart, cancellationToken);
87
SyntaxNodeOrToken nodeOrToken,
FormattingOptions2
.IndentStyle indentStyle, CancellationToken cancellationToken)
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (1)
134
return GetIndentationAfterAsync(previousToken,
FormattingOptions2
.IndentStyle.Block, cancellationToken);
Microsoft.CodeAnalysis.Workspaces (29)
Formatting\FormattingOptions.cs (11)
11
/// <inheritdoc cref="
FormattingOptions2
"/>
14
/// <inheritdoc cref="
FormattingOptions2
.UseTabs"/>
15
public static PerLanguageOption<bool> UseTabs { get; } =
FormattingOptions2
.UseTabs.ToPublicOption();
17
/// <inheritdoc cref="
FormattingOptions2
.TabSize"/>
18
public static PerLanguageOption<int> TabSize { get; } =
FormattingOptions2
.TabSize.ToPublicOption();
20
/// <inheritdoc cref="
FormattingOptions2
.IndentationSize"/>
21
public static PerLanguageOption<int> IndentationSize { get; } =
FormattingOptions2
.IndentationSize.ToPublicOption();
23
/// <inheritdoc cref="
FormattingOptions2
.NewLine"/>
24
public static PerLanguageOption<string> NewLine { get; } =
FormattingOptions2
.NewLine.ToPublicOption();
26
/// <inheritdoc cref="
FormattingOptions2
.IndentStyle"/>
27
public static PerLanguageOption<IndentStyle> SmartIndent { get; } = (PerLanguageOption<IndentStyle>)
FormattingOptions2
.SmartIndent.PublicOption!;
OrganizeImports\OrganizeImportsOptionsProviders.cs (1)
20
NewLine = options.GetOption(
FormattingOptions2
.NewLine, language)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (4)
24
UseTabs = options.GetOption(
FormattingOptions2
.UseTabs, language);
25
TabSize = options.GetOption(
FormattingOptions2
.TabSize, language);
26
IndentationSize = options.GetOption(
FormattingOptions2
.IndentationSize, language);
27
NewLine = options.GetOption(
FormattingOptions2
.NewLine, language);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\SyntaxFormattingOptions.cs (2)
34
WrappingColumn = options.GetOption(
FormattingOptions2
.WrappingColumn, language);
35
ConditionalExpressionWrappingLength = options.GetOption(
FormattingOptions2
.ConditionalExpressionWrappingLength, language);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.cs (1)
19
protected abstract AbstractFormattingRule GetSpecializedIndentationFormattingRule(
FormattingOptions2
.IndentStyle indentStyle);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (4)
70
public IndentationResult? GetDesiredIndentation(
FormattingOptions2
.IndentStyle indentStyle)
73
if (indentStyle ==
FormattingOptions2
.IndentStyle.None)
78
if (indentStyle ==
FormattingOptions2
.IndentStyle.Block ||
84
Debug.Assert(indentStyle ==
FormattingOptions2
.IndentStyle.Smart);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\IndentationOptions.cs (3)
15
[DataMember(Order = 2)] public
FormattingOptions2
.IndentStyle IndentStyle { get; init; } = DefaultIndentStyle;
17
public const
FormattingOptions2
.IndentStyle DefaultIndentStyle =
FormattingOptions2
.IndentStyle.Smart;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Formatting\DocumentFormattingOptionsProviders.cs (1)
19
InsertFinalNewLine = options.GetOption(
FormattingOptions2
.InsertFinalNewLine)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (2)
21
if (indentStyle ==
FormattingOptions2
.IndentStyle.None)
29
if (indentStyle ==
FormattingOptions2
.IndentStyle.Smart &&