1717
1818namespace Microsoft . PowerShell . EditorServices . Handlers
1919{
20- internal class PsesHoverHandler : IHoverHandler
20+ internal class PsesHoverHandler : HoverHandlerBase
2121 {
2222 private readonly ILogger _logger ;
2323 private readonly SymbolsService _symbolsService ;
2424 private readonly WorkspaceService _workspaceService ;
2525
26- private HoverCapability _capability ;
27-
2826 public PsesHoverHandler (
2927 ILoggerFactory factory ,
3028 SymbolsService symbolsService ,
@@ -35,15 +33,12 @@ public PsesHoverHandler(
3533 _workspaceService = workspaceService ;
3634 }
3735
38- public HoverRegistrationOptions GetRegistrationOptions ( )
36+ protected override HoverRegistrationOptions CreateRegistrationOptions ( HoverCapability capability , ClientCapabilities clientCapabilities ) => new HoverRegistrationOptions
3937 {
40- return new HoverRegistrationOptions
41- {
42- DocumentSelector = LspUtils . PowerShellDocumentSelector
43- } ;
44- }
38+ DocumentSelector = LspUtils . PowerShellDocumentSelector
39+ } ;
4540
46- public async Task < Hover > Handle ( HoverParams request , CancellationToken cancellationToken )
41+ public override async Task < Hover > Handle ( HoverParams request , CancellationToken cancellationToken )
4742 {
4843 if ( cancellationToken . IsCancellationRequested )
4944 {
@@ -81,11 +76,6 @@ await _symbolsService.FindSymbolDetailsAtLocationAsync(
8176 } ;
8277 }
8378
84- public void SetCapability ( HoverCapability capability )
85- {
86- _capability = capability ;
87- }
88-
8979 private static Range GetRangeFromScriptRegion ( ScriptRegion scriptRegion )
9080 {
9181 return new Range
0 commit comments