1 type derived from SyntaxFormattingOptions
Microsoft.CodeAnalysis.Workspaces (1)
Formatting\VisualBasic\VisualBasicSyntaxFormattingOptions.cs (1)
13internal sealed record class VisualBasicSyntaxFormattingOptions : SyntaxFormattingOptions, IEquatable<VisualBasicSyntaxFormattingOptions>
1 instantiation of SyntaxFormattingOptions
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\SyntaxFormattingOptions.cs (1)
17internal static readonly SyntaxFormattingOptions CommonDefaults = new();
67 references to SyntaxFormattingOptions
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Formatting\CoreFormatterTestsBase.cs (1)
289var options = formattingService.GetFormattingOptions(StructuredAnalyzerConfigOptions.Empty);
Microsoft.CodeAnalysis.Workspaces (66)
CodeCleanup\AbstractCodeCleanerService.cs (2)
73public async Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, ImmutableArray<ICodeCleanupProvider> providers, CancellationToken cancellationToken) 538SyntaxFormattingOptions options,
CodeCleanup\CodeCleaner.cs (2)
87public static Task<SyntaxNode> CleanupAsync(SyntaxNode root, TextSpan span, SyntaxFormattingOptions options, SolutionServices services, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default) 94public static Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default)
CodeCleanup\ICodeCleanerService.cs (1)
37Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, ImmutableArray<ICodeCleanupProvider> providers, CancellationToken cancellationToken);
CodeCleanup\Providers\FormatCodeCleanupProvider.cs (1)
32public Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, CancellationToken cancellationToken)
CodeCleanup\Providers\ICodeCleanupProvider.cs (1)
34Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, CancellationToken cancellationToken);
CodeCleanup\Providers\SimplificationCodeCleanupProvider.cs (1)
22public Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, CancellationToken cancellationToken)
Formatting\AbstractFormattingService.cs (1)
18public Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, LineFormattingOptions lineFormattingOptions, SyntaxFormattingOptions? syntaxFormattingOptions, CancellationToken cancellationToken)
Formatting\Formatter.cs (19)
52internal static Task<Document> FormatAsync(Document document, SyntaxFormattingOptions options, CancellationToken cancellationToken) 68internal static Task<Document> FormatAsync(Document document, TextSpan span, SyntaxFormattingOptions options, CancellationToken cancellationToken) 91internal static async Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, SyntaxFormattingOptions? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 110internal static Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 113internal static async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 154internal static SyntaxNode Format(SyntaxNode node, SyntaxAnnotation annotation, SolutionServices services, SyntaxFormattingOptions options, CancellationToken cancellationToken) 177internal static SyntaxNode Format(SyntaxNode node, SyntaxAnnotation annotation, SolutionServices services, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 191internal static SyntaxNode Format(SyntaxNode node, SolutionServices services, SyntaxFormattingOptions options, CancellationToken cancellationToken) 206internal static SyntaxNode Format(SyntaxNode node, TextSpan span, SolutionServices services, SyntaxFormattingOptions options, CancellationToken cancellationToken) 227internal static SyntaxNode Format(SyntaxNode node, IEnumerable<TextSpan>? spans, SolutionServices services, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 250var formattingOptions = GetFormattingOptions(workspace, options, node.Language); 254internal static IFormattingResult GetFormattingResult(SyntaxNode node, IEnumerable<TextSpan>? spans, SolutionServices services, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 271internal static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, SolutionServices services, SyntaxFormattingOptions options, CancellationToken cancellationToken) 286internal static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, TextSpan span, SolutionServices services, SyntaxFormattingOptions options, CancellationToken cancellationToken = default) 301internal static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, IEnumerable<TextSpan>? spans, SolutionServices services, SyntaxFormattingOptions options, CancellationToken cancellationToken = default) 312internal static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, IEnumerable<TextSpan>? spans, SolutionServices services, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken = default) 318internal static SyntaxFormattingOptions GetFormattingOptions(Workspace workspace, OptionSet? optionSet, string language) 325internal static async ValueTask<(SyntaxFormattingOptions? Syntax, LineFormattingOptions Line)> GetFormattingOptionsAsync(Document document, OptionSet? optionSet, CancellationToken cancellationToken) 330SyntaxFormattingOptions? syntaxFormattingOptions;
Formatting\IFormattingService.cs (1)
24Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, LineFormattingOptions lineFormattingOptions, SyntaxFormattingOptions? syntaxFormattingOptions, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
209defaultValue: new CodeStyleOption2<AccessibilityModifiersRequired>(SyntaxFormattingOptions.CommonDefaults.AccessibilityModifiersRequired, NotificationOption2.Silent),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Editing\GenerationOptions.cs (1)
23defaultValue: SyntaxFormattingOptions.CommonDefaults.SeparateImportDirectiveGroups,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (4)
23public abstract SyntaxFormattingOptions DefaultOptions { get; } 24public abstract SyntaxFormattingOptions GetFormattingOptions(IOptionsReader options); 30protected abstract AbstractFormattingResult Format(SyntaxNode node, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, SyntaxToken startToken, SyntaxToken endToken, CancellationToken cancellationToken); 32public IFormattingResult GetFormattingResult(SyntaxNode node, IEnumerable<TextSpan>? spans, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
663public SyntaxFormattingOptions Options => _engine.Options;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (5)
46internal readonly SyntaxFormattingOptions Options; 58private static Tuple<ImmutableArray<AbstractFormattingRule>, SyntaxFormattingOptions, ChainedFormattingRules>? s_lastRulesAndOptions; 62SyntaxFormattingOptions options, 75private static ChainedFormattingRules GetChainedFormattingRules(ImmutableArray<AbstractFormattingRule> formattingRules, SyntaxFormattingOptions options) 89SyntaxFormattingOptions options,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (2)
23private readonly SyntaxFormattingOptions _options; 32public ChainedFormattingRules(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxFormattingOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (2)
39private readonly SyntaxFormattingOptions _options; 51public TokenStream(TreeData treeData, SyntaxFormattingOptions options, TextSpan spanToFormat, AbstractTriviaDataFactory factory)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (2)
82defaultValue: SyntaxFormattingOptions.CommonDefaults.WrappingColumn, 90defaultValue: SyntaxFormattingOptions.CommonDefaults.ConditionalExpressionWrappingLength,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\ISyntaxFormatting.cs (3)
16SyntaxFormattingOptions DefaultOptions { get; } 17SyntaxFormattingOptions GetFormattingOptions(IOptionsReader options); 20IFormattingResult GetFormattingResult(SyntaxNode node, IEnumerable<TextSpan>? spans, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\AbstractFormattingRule.cs (1)
16public virtual AbstractFormattingRule WithOptions(SyntaxFormattingOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\FormattingOperations.cs (5)
147internal static IEnumerable<AnchorIndentationOperation> GetAnchorIndentationOperations(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxNode node, SyntaxFormattingOptions options) 159internal static IEnumerable<IndentBlockOperation> GetIndentBlockOperations(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxNode node, SyntaxFormattingOptions options) 171internal static IEnumerable<AlignTokensOperation> GetAlignTokensOperations(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxNode node, SyntaxFormattingOptions options) 183internal static AdjustNewLinesOperation? GetAdjustNewLinesOperation(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxToken previousToken, SyntaxToken currentToken, SyntaxFormattingOptions options) 192internal static AdjustSpacesOperation? GetAdjustSpacesOperation(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxToken previousToken, SyntaxToken currentToken, SyntaxFormattingOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\SyntaxFormattingOptions.cs (1)
17internal static readonly SyntaxFormattingOptions CommonDefaults = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
228protected SyntaxFormattingOptions Options
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\IndentationOptions.cs (1)
12[property: DataMember(Order = 0)] SyntaxFormattingOptions FormattingOptions)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\OrganizeImports\OrganizeImportsOptions.cs (1)
15[DataMember] public bool SeparateImportDirectiveGroups { get; init; } = SyntaxFormattingOptions.CommonDefaults.SeparateImportDirectiveGroups;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Formatting\ISyntaxFormattingService.cs (1)
17ImmutableArray<TextChange> GetFormattingChangesOnPaste(ParsedDocument document, TextSpan textSpan, SyntaxFormattingOptions options, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Formatting\SyntaxFormattingOptionsProviders.cs (4)
14public static SyntaxFormattingOptions GetSyntaxFormattingOptions(this IOptionsReader options, Host.LanguageServices languageServices) 17public static ValueTask<SyntaxFormattingOptions> GetSyntaxFormattingOptionsAsync(this Document document, CancellationToken cancellationToken) 20public static async ValueTask<SyntaxFormattingOptions> GetSyntaxFormattingOptionsAsync(this Document document, ISyntaxFormatting formatting, CancellationToken cancellationToken) 26public static SyntaxFormattingOptions GetDefault(Host.LanguageServices languageServices)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
78public static string GetIndentationString(this IndentationResult indentationResult, SourceText sourceText, SyntaxFormattingOptions options)