Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,14 @@ internal static class PredefinedCommandHandlerNames
/// Command handler name for showing the Callstack Explorer tool window.
/// </summary>
public const string ShowCallstackExplorer = "Show Callstack Explorer";

/// <summary>
/// Command handler name for LSP Go To Definition.
/// </summary>
public const string LspGoToDefinition = "LSP Go To Definition Command Handler";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is "LSP GoToDefinitionCommandHandler" btw

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot use exactly LSP GoToDefinitionCommandHandler as the value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to "LSP GoToDefinitionCommandHandler" in e37817f


/// <summary>
/// Command handler name for LSP Find References.
/// </summary>
public const string LspFindReferences = "LSP Find References Command Handler";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot use exactly LSP FindReferenceCommandHandler as the value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to "LSP FindReferenceCommandHandler" in e37817f

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you doc that these names are agreed upon externally and cannot change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot can you update the summary documentation that these names are agreed upon externally and cannot change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated documentation for all three LSP command handler names to indicate they are agreed upon externally and cannot be changed in c63bb03

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace Microsoft.CodeAnalysis.FindReferences;
[Export(typeof(ICommandHandler))]
[ContentType(ContentTypeNames.RoslynContentType)]
[Name(PredefinedCommandHandlerNames.FindReferences)]
[Order(Before = PredefinedCommandHandlerNames.LspFindReferences)]
[method: ImportingConstructor]
[method: SuppressMessage("RoslynDiagnosticsReliability", "RS0033:Importing constructor should be [Obsolete]", Justification = "Used in test code: https://github.com/dotnet/roslyn/issues/42814")]
internal sealed class FindReferencesCommandHandler(FindReferencesNavigationService navigationService)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace Microsoft.CodeAnalysis.GoToDefinition;
[Export(typeof(ICommandHandler))]
[ContentType(ContentTypeNames.RoslynContentType)]
[Name(PredefinedCommandHandlerNames.GoToDefinition)]
[Order(Before = PredefinedCommandHandlerNames.LspGoToDefinition)]
[method: ImportingConstructor]
[method: SuppressMessage("RoslynDiagnosticsReliability", "RS0033:Importing constructor should be [Obsolete]", Justification = "Used in test code: https://github.com/dotnet/roslyn/issues/42814")]
internal sealed class GoToDefinitionCommandHandler(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ public override ServerCapabilities GetCapabilities(ClientCapabilities clientCapa

serverCapabilities.SpellCheckingProvider = true;

// Enable go to definition and find all references capabilities for experimentation.
// These are enabled regardless of the LSP feature flag to allow clients to call these handlers.
serverCapabilities.DefinitionProvider = true;
serverCapabilities.ReferencesProvider = new ReferenceOptions
{
WorkDoneProgress = true,
};

return serverCapabilities;
}

Expand Down
Loading