Skip to content

Commit e62eb38

Browse files
committed
Add workspace and document symbol capabilities
This change adds two new fields to the ServerCapabilities class: WorkspaceSymbolProvider and DocumentSymbolProvider. Setting these to true causes the VS Code extension to send requests for workspace and document symbols when the user triggers the corresponding actions.
1 parent 1506c9a commit e62eb38

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/PowerShellEditorServices.Host/LanguageServer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ await requestContext.SendResult(
100100
DefinitionProvider = true,
101101
ReferencesProvider = true,
102102
DocumentHighlightProvider = true,
103+
DocumentSymbolProvider = true,
104+
WorkspaceSymbolProvider = true,
103105
HoverProvider = true,
104106
CompletionProvider = new CompletionOptions
105107
{

src/PowerShellEditorServices.Protocol/LanguageServer/ServerCapabilities.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ public class ServerCapabilities
2727
public bool? ReferencesProvider { get; set; }
2828

2929
public bool? DocumentHighlightProvider { get; set; }
30+
31+
public bool? DocumentSymbolProvider { get; set; }
32+
33+
public bool? WorkspaceSymbolProvider { get; set; }
3034
}
3135

3236
/// <summary>

0 commit comments

Comments
 (0)