Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options master plan #58717

Closed
57 of 73 tasks
tmat opened this issue Jan 7, 2022 · 1 comment
Closed
57 of 73 tasks

Options master plan #58717

tmat opened this issue Jan 7, 2022 · 1 comment
Assignees
Labels
Area-IDE Concept-Continuous Improvement Story User Story A single user-facing feature. Can be grouped under an epic.
Milestone

Comments

@tmat
Copy link
Member

tmat commented Jan 7, 2022

Work items:

  • Finish Separate global options and solution options #55728
  • Eliminate editorconfig options mapping (TryMapEditorConfigKeyToOption)
    • Moved to IEditorConfigOptionMappingService
    • May be possible to hardcode public options, we shouldn't need mapping for other
  • Move IGlobalOptionService to LSP layer, later on to EditorFeatures once solution crawler is removed
    Currently also used by LSP server to read Pull/Push diagnostics option.
    Remove InlineHintsOptions.DisplayAllOverride #57283
  • Internally obsolete/remove:
    • OptionSet,
    • DocumentOptionSet,
    • SerializableOptionSet - replaced with SolutionOptionSet
    • WorkspaceOptionSet,
    • AnalyzerConfigOptionSet
  • Remove IDocumentOptionsProvider,
    Remove RazorDocumentOptionsProvider. Razor only uses this to override indentation options. These should flow via LSP/EditorOptions.
    Refactor InferredIndentationDocumentOptionsProviderFactory to avoid IDocumentOptionsProvider. These should be just flow from EditorOptions.
  • Remove IOptionService (replaced with ILegacyWorkspaceOptionService)
  • Obsolete Document.GetOptionsAsync
  • Obsolete Solution.Options and Workspace.Options
    Services that currently read Solution options should be passed their options explicitly using specific option record (as described in Separate global options and solution options #55728).
    The source of these options would be either IGlobalOptionService service accessed in client code in EditorFeatures layer or above, or LSP server who receives the options from the LSP client.
    Note: Need to serialize values for options read from editorconfig.
    • AddImportOptions
    • CodeActionOptions
    • FadingOptions
    • FormattingOptionsMetadata
    • CompletionOptions
    • DiagnosticOptions
    • DocumentationCommentOptions
    • RegularExpressionsOptions
    • ExtractMethodOptions
    • GenerateOverridesOptions
    • ImplementTypeOptions
    • InlineParameterHintsOptions
    • InlineTypeHintsOptions
    • NavigationOptionsProvider
    • QuickInfoOptions
    • BlockStructureOptions
    • ValidateFormatStringOptionProvider
    • ClassificationOptions
    • CodeStyleOptionsProvider
    • GenerationOptionsProvider
    • PythiaOptions
    • AutoFormattingOptions
    • SimplificationOptionProvider
    • SolutionCrawlerOnOffOptionsProvider
    • StorageOptions
    • SymbolSearchOptions
    • TodoCommentOptions
    • FormattingOptions2
    • SyntaxTreeConfigurationOptions
    • VisualStudioSyntaxTreeConfigurationService
    • GenerateEqualsAndGetHashCodeFromMembersOptions
  • Public options:
    The corresponding APIs need to load these from Solution.Options for backward compat. These will not be available OOP.
    • CSharpFormattingOptions
    • RenameOptions
    • SimplificationOptions
    • CodeStyleOptions
  • Remove IOptionProvider, ExportOption attributes
    All options should be global options or .editorconfig options. SolutionExportOptionAttirbute is only needed for serialization to SerializableOptionSet. GlobalExportOptionAttribute is not needed.
  • Analyzers will read their settings from AnalyzerConfigOptions
    Remove AnalyzerConfigOptionsImpl, which combines AnalyzerConfigOptions with OptionSet. Instead, represent .editorconfig option values that are stored in VS registry settings and used as defaults when no .editorconfig applies as AnalyzerConfigOptions implementing a global .editorconfig. This instance of AnalyzerConfigOptions can be stored in on WorkspaceAnalyzerOptions and trivially serializable.

Editor/Platform prerequisites:

  • Make IVsTextView.IndentStyle available through ITextView.Options: VS #1412138
  • Custom editorconfig properties are not exposed through editor options: VS #1429383
  • Editorconfig options in the editor do not have lowercased keys and the dictionary is not case-insensitive VS #1556206
  • Add free-threaded API that replaces IVsTextManager4.GetUserPreferences4: VS #1307188
  • LSP options design and implementation

Related:

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 7, 2022
@tmat tmat added this to the Backlog milestone Jan 7, 2022
@tmat tmat self-assigned this Jan 7, 2022
@jinujoseph jinujoseph added Story and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 7, 2022
@mikadumont mikadumont modified the milestones: Backlog, 17.2 Jan 11, 2022
@mikadumont mikadumont added the User Story A single user-facing feature. Can be grouped under an epic. label Jan 11, 2022
@tmat tmat mentioned this issue Feb 9, 2022
3 tasks
@jinujoseph jinujoseph modified the milestones: 17.2, 17.3 May 5, 2022
@tmat tmat modified the milestones: 17.3, 17.4 Jul 15, 2022
@arunchndr arunchndr modified the milestones: 17.4, 17.6 P3 Jan 17, 2023
@arunchndr arunchndr modified the milestones: 17.6 P3, Backlog Nov 13, 2024
@CyrusNajmabadi
Copy link
Member

@tmat ANything left to do on this? If so, reactive and assign a milestone for it. tnx.

@CyrusNajmabadi CyrusNajmabadi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Continuous Improvement Story User Story A single user-facing feature. Can be grouped under an epic.
Projects
None yet
Development

No branches or pull requests

5 participants