@@ -34,8 +34,6 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
34
34
}
35
35
}
36
36
37
- package static var builtInCommands : [ String ] { [ ] }
38
-
39
37
package static var experimentalCapabilities : [ String : LSPAny ] {
40
38
return [
41
39
DoccDocumentationRequest . method: . dictionary( [ " version " : . int( 1 ) ] )
@@ -53,13 +51,6 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
53
51
self . documentationManager = DocCDocumentationManager ( buildServerManager: workspace. buildServerManager)
54
52
}
55
53
56
- func workspaceForDocument( uri: DocumentURI ) async throws -> Workspace ? {
57
- guard let sourceKitLSPServer else {
58
- throw ResponseError . unknown ( " Connection to the editor closed " )
59
- }
60
- return await sourceKitLSPServer. workspaceForDocument ( uri: uri)
61
- }
62
-
63
54
package nonisolated func canHandle( workspace: Workspace , toolchain: Toolchain ) -> Bool {
64
55
return true
65
56
}
@@ -72,10 +63,6 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
72
63
)
73
64
}
74
65
75
- package func clientInitialized( _ initialized: InitializedNotification ) async {
76
- // Nothing to set up
77
- }
78
-
79
66
package func shutdown( ) async {
80
67
// Nothing to tear down
81
68
}
@@ -109,200 +96,4 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
109
96
) async {
110
97
// The DocumentationLanguageService does not do anything with document events
111
98
}
112
-
113
- package func willSaveDocument( _ notification: WillSaveTextDocumentNotification ) async {
114
- // The DocumentationLanguageService does not do anything with document events
115
- }
116
-
117
- package func didSaveDocument( _ notification: DidSaveTextDocumentNotification ) async {
118
- // The DocumentationLanguageService does not do anything with document events
119
- }
120
-
121
- package func filesDidChange( _ events: [ FileEvent ] ) async {
122
- await documentationManager. filesDidChange ( events)
123
- }
124
-
125
- package func documentUpdatedBuildSettings( _ uri: DocumentURI ) async {
126
- // The DocumentationLanguageService does not do anything with document events
127
- }
128
-
129
- package func documentDependenciesUpdated( _ uris: Set < DocumentURI > ) async {
130
- // The DocumentationLanguageService does not do anything with document events
131
- }
132
-
133
- package func completion( _ req: CompletionRequest ) async throws -> CompletionList {
134
- CompletionList ( isIncomplete: false , items: [ ] )
135
- }
136
-
137
- package func completionItemResolve( _ req: CompletionItemResolveRequest ) async throws -> CompletionItem {
138
- return req. item
139
- }
140
-
141
- package func hover( _ req: HoverRequest ) async throws -> HoverResponse ? {
142
- nil
143
- }
144
-
145
- package func symbolInfo( _ request: SymbolInfoRequest ) async throws -> [ SymbolDetails ] {
146
- [ ]
147
- }
148
-
149
- package func symbolGraph(
150
- forOnDiskContentsOf symbolDocumentUri: DocumentURI ,
151
- at location: SymbolLocation
152
- ) async throws -> String {
153
- throw ResponseError . internalError ( " Not applicable " )
154
- }
155
-
156
- package func symbolGraph(
157
- for snapshot: SourceKitLSP . DocumentSnapshot ,
158
- at position: LanguageServerProtocol . Position
159
- ) async throws -> ( symbolGraph: String , usr: String , overrideDocComments: [ String ] ) {
160
- throw ResponseError . internalError ( " Not applicable " )
161
- }
162
-
163
- package func openGeneratedInterface(
164
- document: DocumentURI ,
165
- moduleName: String ,
166
- groupName: String ? ,
167
- symbolUSR symbol: String ?
168
- ) async throws -> GeneratedInterfaceDetails ? {
169
- nil
170
- }
171
-
172
- package func definition( _ request: DefinitionRequest ) async throws -> LocationsOrLocationLinksResponse ? {
173
- nil
174
- }
175
-
176
- package func declaration( _ request: DeclarationRequest ) async throws -> LocationsOrLocationLinksResponse ? {
177
- nil
178
- }
179
-
180
- package func documentSymbolHighlight( _ req: DocumentHighlightRequest ) async throws -> [ DocumentHighlight ] ? {
181
- nil
182
- }
183
-
184
- package func foldingRange( _ req: FoldingRangeRequest ) async throws -> [ FoldingRange ] ? {
185
- nil
186
- }
187
-
188
- package func documentSymbol( _ req: DocumentSymbolRequest ) async throws -> DocumentSymbolResponse ? {
189
- nil
190
- }
191
-
192
- package func documentColor( _ req: DocumentColorRequest ) async throws -> [ ColorInformation ] {
193
- [ ]
194
- }
195
-
196
- package func documentSemanticTokens(
197
- _ req: DocumentSemanticTokensRequest
198
- ) async throws -> DocumentSemanticTokensResponse ? {
199
- nil
200
- }
201
-
202
- package func documentSemanticTokensDelta(
203
- _ req: DocumentSemanticTokensDeltaRequest
204
- ) async throws -> DocumentSemanticTokensDeltaResponse ? {
205
- nil
206
- }
207
-
208
- package func documentSemanticTokensRange(
209
- _ req: DocumentSemanticTokensRangeRequest
210
- ) async throws -> DocumentSemanticTokensResponse ? {
211
- nil
212
- }
213
-
214
- package func colorPresentation( _ req: ColorPresentationRequest ) async throws -> [ ColorPresentation ] {
215
- [ ]
216
- }
217
-
218
- package func codeAction( _ req: CodeActionRequest ) async throws -> CodeActionRequestResponse ? {
219
- nil
220
- }
221
-
222
- package func inlayHint( _ req: InlayHintRequest ) async throws -> [ InlayHint ] {
223
- [ ]
224
- }
225
-
226
- package func codeLens( _ req: CodeLensRequest ) async throws -> [ CodeLens ] {
227
- [ ]
228
- }
229
-
230
- package func documentDiagnostic( _ req: DocumentDiagnosticsRequest ) async throws -> DocumentDiagnosticReport {
231
- . full( RelatedFullDocumentDiagnosticReport ( items: [ ] ) )
232
- }
233
-
234
- package func documentFormatting( _ req: DocumentFormattingRequest ) async throws -> [ TextEdit ] ? {
235
- nil
236
- }
237
-
238
- package func documentRangeFormatting(
239
- _ req: LanguageServerProtocol . DocumentRangeFormattingRequest
240
- ) async throws -> [ LanguageServerProtocol . TextEdit ] ? {
241
- return nil
242
- }
243
-
244
- package func documentOnTypeFormatting( _ req: DocumentOnTypeFormattingRequest ) async throws -> [ TextEdit ] ? {
245
- return nil
246
- }
247
-
248
- package func rename( _ request: RenameRequest ) async throws -> ( edits: WorkspaceEdit , usr: String ? ) {
249
- ( edits: WorkspaceEdit ( ) , usr: nil )
250
- }
251
-
252
- package func editsToRename(
253
- locations renameLocations: [ RenameLocation ] ,
254
- in snapshot: DocumentSnapshot ,
255
- oldName: CrossLanguageName ,
256
- newName: CrossLanguageName
257
- ) async throws -> [ TextEdit ] {
258
- [ ]
259
- }
260
-
261
- package func prepareRename(
262
- _ request: PrepareRenameRequest
263
- ) async throws -> ( prepareRename: PrepareRenameResponse , usr: String ? ) ? {
264
- nil
265
- }
266
-
267
- package func indexedRename( _ request: IndexedRenameRequest ) async throws -> WorkspaceEdit ? {
268
- nil
269
- }
270
-
271
- package func editsToRenameParametersInFunctionBody(
272
- snapshot: DocumentSnapshot ,
273
- renameLocation: RenameLocation ,
274
- newName: CrossLanguageName
275
- ) async -> [ TextEdit ] {
276
- [ ]
277
- }
278
-
279
- package func executeCommand( _ req: ExecuteCommandRequest ) async throws -> LSPAny ? {
280
- nil
281
- }
282
-
283
- package func getReferenceDocument( _ req: GetReferenceDocumentRequest ) async throws -> GetReferenceDocumentResponse {
284
- GetReferenceDocumentResponse ( content: " " )
285
- }
286
-
287
- package func syntacticDocumentTests(
288
- for uri: DocumentURI ,
289
- in workspace: Workspace
290
- ) async throws -> [ AnnotatedTestItem ] ? {
291
- nil
292
- }
293
-
294
- package static func syntacticTestItems( in uri: DocumentURI ) async -> [ AnnotatedTestItem ] {
295
- return [ ]
296
- }
297
-
298
- package func canonicalDeclarationPosition(
299
- of position: Position ,
300
- in uri: DocumentURI
301
- ) async -> Position ? {
302
- nil
303
- }
304
-
305
- package func crash( ) async {
306
- // There's no way to crash the DocumentationLanguageService
307
- }
308
99
}
0 commit comments