File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/PowerShellEditorServices/Services/TextDocument/Handlers Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1- //
1+ //
22// Copyright (c) Microsoft. All rights reserved.
33// Licensed under the MIT license. See LICENSE file in the project root for full license information.
44//
@@ -20,7 +20,7 @@ namespace Microsoft.PowerShell.EditorServices.Handlers
2020{
2121 internal class PsesSemanticTokensHandler : SemanticTokensHandlerBase
2222 {
23- private static readonly SemanticTokensRegistrationOptions s_registrationOptions = new SemanticTokensRegistrationOptions
23+ protected override SemanticTokensRegistrationOptions CreateRegistrationOptions ( SemanticTokensCapability capability , ClientCapabilities clientCapabilities ) => new SemanticTokensRegistrationOptions
2424 {
2525 DocumentSelector = LspUtils . PowerShellDocumentSelector ,
2626 Legend = new SemanticTokensLegend ( ) ,
@@ -35,7 +35,6 @@ internal class PsesSemanticTokensHandler : SemanticTokensHandlerBase
3535 private readonly WorkspaceService _workspaceService ;
3636
3737 public PsesSemanticTokensHandler ( ILogger < PsesSemanticTokensHandler > logger , WorkspaceService workspaceService )
38- : base ( s_registrationOptions )
3938 {
4039 _logger = logger ;
4140 _workspaceService = workspaceService ;
@@ -160,7 +159,7 @@ protected override Task<SemanticTokensDocument> GetSemanticTokensDocument(
160159 ITextDocumentIdentifierParams @params ,
161160 CancellationToken cancellationToken )
162161 {
163- return Task . FromResult ( new SemanticTokensDocument ( GetRegistrationOptions ( ) . Legend ) ) ;
162+ return Task . FromResult ( new SemanticTokensDocument ( RegistrationOptions . Legend ) ) ;
164163 }
165164 }
166165}
You can’t perform that action at this time.
0 commit comments