@@ -82,7 +82,7 @@ public void Dispose()
8282 _jsonRpc . Dispose ( ) ;
8383 }
8484
85- private static ILspLogger CreateILspLogger ( ILoggerFactory loggerFactory , ITelemetryReporter telemetryReporter )
85+ private static ClaspLoggingBridge CreateILspLogger ( ILoggerFactory loggerFactory , ITelemetryReporter telemetryReporter )
8686 {
8787 return new ClaspLoggingBridge ( loggerFactory , telemetryReporter ) ;
8888 }
@@ -127,40 +127,37 @@ protected override ILspServices ConstructLspServices()
127127
128128 services . AddLifeCycleServices ( this , _clientConnection , _lspServerActivationTracker ) ;
129129
130- services . AddSemanticTokensServices ( featureOptions ) ;
130+ services . AddSemanticTokensServices ( ) ;
131131 services . AddDocumentManagementServices ( ) ;
132- services . AddFormattingServices ( featureOptions ) ;
132+ services . AddFormattingServices ( ) ;
133133 services . AddOptionsServices ( _lspOptions ) ;
134- services . AddTextDocumentServices ( featureOptions ) ;
134+ services . AddTextDocumentServices ( ) ;
135135
136- if ( ! featureOptions . UseRazorCohostServer )
137- {
138- // Diagnostics
139- services . AddDiagnosticServices ( ) ;
136+ // Diagnostics
137+ services . AddDiagnosticServices ( ) ;
140138
141- services . AddCodeActionsServices ( ) ;
139+ services . AddCodeActionsServices ( ) ;
142140
143- // Completion
144- services . AddCompletionServices ( ) ;
141+ // Completion
142+ services . AddCompletionServices ( ) ;
145143
146- // Auto insert
147- services . AddSingleton < IOnAutoInsertProvider , CloseTextTagOnAutoInsertProvider > ( ) ;
148- services . AddSingleton < IOnAutoInsertProvider , AutoClosingTagOnAutoInsertProvider > ( ) ;
144+ // Auto insert
145+ services . AddSingleton < IOnAutoInsertProvider , CloseTextTagOnAutoInsertProvider > ( ) ;
146+ services . AddSingleton < IOnAutoInsertProvider , AutoClosingTagOnAutoInsertProvider > ( ) ;
149147
150- services . AddSingleton < IAutoInsertService , AutoInsertService > ( ) ;
148+ services . AddSingleton < IAutoInsertService , AutoInsertService > ( ) ;
151149
152- // Folding Range Providers
153- services . AddSingleton < IRazorFoldingRangeProvider , RazorCodeBlockFoldingProvider > ( ) ;
154- services . AddSingleton < IRazorFoldingRangeProvider , RazorCSharpStatementFoldingProvider > ( ) ;
155- services . AddSingleton < IRazorFoldingRangeProvider , RazorCSharpStatementKeywordFoldingProvider > ( ) ;
156- services . AddSingleton < IRazorFoldingRangeProvider , SectionDirectiveFoldingProvider > ( ) ;
157- services . AddSingleton < IRazorFoldingRangeProvider , UsingsFoldingRangeProvider > ( ) ;
150+ // Folding Range Providers
151+ services . AddSingleton < IRazorFoldingRangeProvider , RazorCodeBlockFoldingProvider > ( ) ;
152+ services . AddSingleton < IRazorFoldingRangeProvider , RazorCSharpStatementFoldingProvider > ( ) ;
153+ services . AddSingleton < IRazorFoldingRangeProvider , RazorCSharpStatementKeywordFoldingProvider > ( ) ;
154+ services . AddSingleton < IRazorFoldingRangeProvider , SectionDirectiveFoldingProvider > ( ) ;
155+ services . AddSingleton < IRazorFoldingRangeProvider , UsingsFoldingRangeProvider > ( ) ;
158156
159- services . AddSingleton < IFoldingRangeService , FoldingRangeService > ( ) ;
157+ services . AddSingleton < IFoldingRangeService , FoldingRangeService > ( ) ;
160158
161- // Hover
162- services . AddHoverServices ( ) ;
163- }
159+ // Hover
160+ services . AddHoverServices ( ) ;
164161
165162 // Other
166163 services . AddSingleton < IRazorComponentSearchEngine , RazorComponentSearchEngine > ( ) ;
@@ -171,54 +168,51 @@ protected override ILspServices ConstructLspServices()
171168 // Defaults: For when the caller hasn't provided them through the `configure` action.
172169 services . TryAddSingleton < IHostServicesProvider , DefaultHostServicesProvider > ( ) ;
173170
174- AddHandlers ( services , featureOptions ) ;
171+ AddHandlers ( services ) ;
175172
176173 var lspServices = new LspServices ( services ) ;
177174
178175 return lspServices ;
179176
180- static void AddHandlers ( IServiceCollection services , LanguageServerFeatureOptions featureOptions )
177+ static void AddHandlers ( IServiceCollection services )
181178 {
182179 // Not calling AddHandler because we want to register this endpoint as an IOnInitialized too
183180 services . AddSingleton < RazorConfigurationEndpoint > ( ) ;
184181 services . AddSingleton < IMethodHandler , RazorConfigurationEndpoint > ( s => s . GetRequiredService < RazorConfigurationEndpoint > ( ) ) ;
185182 // Transient because it should only be used once and I'm hoping it doesn't stick around.
186183 services . AddTransient < IOnInitialized > ( sp => sp . GetRequiredService < RazorConfigurationEndpoint > ( ) ) ;
187184
188- if ( ! featureOptions . UseRazorCohostServer )
189- {
190- services . AddHandlerWithCapabilities < ImplementationEndpoint > ( ) ;
185+ services . AddHandlerWithCapabilities < ImplementationEndpoint > ( ) ;
191186
192- services . AddSingleton < IRazorComponentDefinitionService , RazorComponentDefinitionService > ( ) ;
193- services . AddHandlerWithCapabilities < DefinitionEndpoint > ( ) ;
187+ services . AddSingleton < IRazorComponentDefinitionService , RazorComponentDefinitionService > ( ) ;
188+ services . AddHandlerWithCapabilities < DefinitionEndpoint > ( ) ;
194189
195- services . AddSingleton < IRenameService , RenameService > ( ) ;
196- services . AddHandlerWithCapabilities < RenameEndpoint > ( ) ;
190+ services . AddSingleton < IRenameService , RenameService > ( ) ;
191+ services . AddHandlerWithCapabilities < RenameEndpoint > ( ) ;
197192
198- services . AddHandlerWithCapabilities < OnAutoInsertEndpoint > ( ) ;
199- services . AddHandlerWithCapabilities < DocumentHighlightEndpoint > ( ) ;
200- services . AddHandlerWithCapabilities < SignatureHelpEndpoint > ( ) ;
201- services . AddHandlerWithCapabilities < LinkedEditingRangeEndpoint > ( ) ;
202- services . AddHandlerWithCapabilities < FoldingRangeEndpoint > ( ) ;
193+ services . AddHandlerWithCapabilities < OnAutoInsertEndpoint > ( ) ;
194+ services . AddHandlerWithCapabilities < DocumentHighlightEndpoint > ( ) ;
195+ services . AddHandlerWithCapabilities < SignatureHelpEndpoint > ( ) ;
196+ services . AddHandlerWithCapabilities < LinkedEditingRangeEndpoint > ( ) ;
197+ services . AddHandlerWithCapabilities < FoldingRangeEndpoint > ( ) ;
203198
204- services . AddSingleton < IInlayHintService , InlayHintService > ( ) ;
205- services . AddHandlerWithCapabilities < InlayHintEndpoint > ( ) ;
206- services . AddHandler < InlayHintResolveEndpoint > ( ) ;
199+ services . AddSingleton < IInlayHintService , InlayHintService > ( ) ;
200+ services . AddHandlerWithCapabilities < InlayHintEndpoint > ( ) ;
201+ services . AddHandler < InlayHintResolveEndpoint > ( ) ;
207202
208- services . AddHandlerWithCapabilities < DocumentSymbolEndpoint > ( ) ;
209- services . AddSingleton < IDocumentSymbolService , DocumentSymbolService > ( ) ;
203+ services . AddHandlerWithCapabilities < DocumentSymbolEndpoint > ( ) ;
204+ services . AddSingleton < IDocumentSymbolService , DocumentSymbolService > ( ) ;
210205
211- services . AddHandlerWithCapabilities < DocumentColorEndpoint > ( ) ;
212- services . AddHandler < ColorPresentationEndpoint > ( ) ;
206+ services . AddHandlerWithCapabilities < DocumentColorEndpoint > ( ) ;
207+ services . AddHandler < ColorPresentationEndpoint > ( ) ;
213208
214- services . AddHandlerWithCapabilities < ProjectContextsEndpoint > ( ) ;
209+ services . AddHandlerWithCapabilities < ProjectContextsEndpoint > ( ) ;
215210
216- services . AddHandlerWithCapabilities < FindAllReferencesEndpoint > ( ) ;
211+ services . AddHandlerWithCapabilities < FindAllReferencesEndpoint > ( ) ;
217212
218- services . AddHandlerWithCapabilities < ValidateBreakpointRangeEndpoint > ( ) ;
219- services . AddHandler < RazorBreakpointSpanEndpoint > ( ) ;
220- services . AddHandler < RazorProximityExpressionsEndpoint > ( ) ;
221- }
213+ services . AddHandlerWithCapabilities < ValidateBreakpointRangeEndpoint > ( ) ;
214+ services . AddHandler < RazorBreakpointSpanEndpoint > ( ) ;
215+ services . AddHandler < RazorProximityExpressionsEndpoint > ( ) ;
222216
223217 services . AddHandler < WrapWithTagEndpoint > ( ) ;
224218
0 commit comments