Clarify SymbolDisplayDelegateStyle documentation to reference SymbolDisplayParameterOptions #80886
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #11232
Problem
The documentation for
SymbolDisplayDelegateStyle.NameAndSignaturewas misleading. The example showed"void SomeDelegate(int x)", which suggested that parameter names would always be displayed when using this option. However, the actual behavior depends on theSymbolDisplayParameterOptionsflags being set.Users were confused when
NameAndSignaturedidn't show parameter names or details, not realizing they needed to also specify appropriateSymbolDisplayParameterOptionsflags to control what appears within the signature.Changes
Updated the documentation for both
NameAndParametersandNameAndSignatureto:Clarify the separation of concerns:
SymbolDisplayDelegateStylecontrols whether the signature part appearsSymbolDisplayParameterOptionscontrols what appears in the signature (types, names, modifiers, etc.)Add explicit references:
<see cref="SymbolDisplayParameterOptions"/>Fix misleading examples:
"void SomeDelegate(int x)"to"void SomeDelegate(int, int)"to avoid implying parameter names are automatically includedSymbolDisplayParameterOptions.IncludeNameis setExample
The updated documentation makes it clear that users need to set the appropriate
SymbolDisplayParameterOptionsflags to get the desired level of detail in the signature.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.