10
10
//
11
11
//===----------------------------------------------------------------------===//
12
12
13
- import BuildSystemIntegration
14
- import Csourcekitd
15
- import Dispatch
16
13
import Foundation
17
- import IndexStoreDB
18
- import SKLogging
19
- import SemanticIndex
20
- import SwiftExtensions
21
- import SwiftParser
22
- import SwiftParserDiagnostics
23
14
24
15
#if compiler(>=6)
25
16
package import LanguageServerProtocol
@@ -109,16 +100,14 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
109
100
}
110
101
111
102
package func completion( _ req: CompletionRequest ) async throws -> CompletionList {
112
- . init ( isIncomplete: false , items: [ ] )
103
+ CompletionList ( isIncomplete: false , items: [ ] )
113
104
}
114
105
115
106
package func hover( _ req: HoverRequest ) async throws -> HoverResponse ? {
116
- . none
107
+ nil
117
108
}
118
109
119
- package func symbolInfo(
120
- _ request: SymbolInfoRequest
121
- ) async throws -> [ SymbolDetails ] {
110
+ package func symbolInfo( _ request: SymbolInfoRequest ) async throws -> [ SymbolDetails ] {
122
111
[ ]
123
112
}
124
113
@@ -131,39 +120,27 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
131
120
nil
132
121
}
133
122
134
- package func definition(
135
- _ request: DefinitionRequest
136
- ) async throws -> LocationsOrLocationLinksResponse ? {
123
+ package func definition( _ request: DefinitionRequest ) async throws -> LocationsOrLocationLinksResponse ? {
137
124
nil
138
125
}
139
126
140
- package func declaration(
141
- _ request: DeclarationRequest
142
- ) async throws -> LocationsOrLocationLinksResponse ? {
127
+ package func declaration( _ request: DeclarationRequest ) async throws -> LocationsOrLocationLinksResponse ? {
143
128
nil
144
129
}
145
130
146
- package func documentSymbolHighlight(
147
- _ req: DocumentHighlightRequest
148
- ) async throws -> [ DocumentHighlight ] ? {
131
+ package func documentSymbolHighlight( _ req: DocumentHighlightRequest ) async throws -> [ DocumentHighlight ] ? {
149
132
nil
150
133
}
151
134
152
- package func foldingRange(
153
- _ req: FoldingRangeRequest
154
- ) async throws -> [ FoldingRange ] ? {
135
+ package func foldingRange( _ req: FoldingRangeRequest ) async throws -> [ FoldingRange ] ? {
155
136
nil
156
137
}
157
138
158
- package func documentSymbol(
159
- _ req: DocumentSymbolRequest
160
- ) async throws -> DocumentSymbolResponse ? {
139
+ package func documentSymbol( _ req: DocumentSymbolRequest ) async throws -> DocumentSymbolResponse ? {
161
140
nil
162
141
}
163
142
164
- package func documentColor(
165
- _ req: DocumentColorRequest
166
- ) async throws -> [ ColorInformation ] {
143
+ package func documentColor( _ req: DocumentColorRequest ) async throws -> [ ColorInformation ] {
167
144
[ ]
168
145
}
169
146
@@ -185,37 +162,27 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
185
162
nil
186
163
}
187
164
188
- package func colorPresentation(
189
- _ req: ColorPresentationRequest
190
- ) async throws -> [ ColorPresentation ] {
165
+ package func colorPresentation( _ req: ColorPresentationRequest ) async throws -> [ ColorPresentation ] {
191
166
[ ]
192
167
}
193
168
194
- package func codeAction(
195
- _ req: CodeActionRequest
196
- ) async throws -> CodeActionRequestResponse ? {
169
+ package func codeAction( _ req: CodeActionRequest ) async throws -> CodeActionRequestResponse ? {
197
170
nil
198
171
}
199
172
200
- package func inlayHint(
201
- _ req: InlayHintRequest
202
- ) async throws -> [ InlayHint ] {
173
+ package func inlayHint( _ req: InlayHintRequest ) async throws -> [ InlayHint ] {
203
174
[ ]
204
175
}
205
176
206
177
package func codeLens( _ req: CodeLensRequest ) async throws -> [ CodeLens ] {
207
178
[ ]
208
179
}
209
180
210
- package func documentDiagnostic(
211
- _ req: DocumentDiagnosticsRequest
212
- ) async throws -> DocumentDiagnosticReport {
213
- . full( . init( items: [ ] ) )
181
+ package func documentDiagnostic( _ req: DocumentDiagnosticsRequest ) async throws -> DocumentDiagnosticReport {
182
+ . full( RelatedFullDocumentDiagnosticReport ( items: [ ] ) )
214
183
}
215
184
216
- package func documentFormatting(
217
- _ req: DocumentFormattingRequest
218
- ) async throws -> [ TextEdit ] ? {
185
+ package func documentFormatting( _ req: DocumentFormattingRequest ) async throws -> [ TextEdit ] ? {
219
186
nil
220
187
}
221
188
@@ -229,10 +196,8 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
229
196
return nil
230
197
}
231
198
232
- package func rename(
233
- _ request: RenameRequest
234
- ) async throws -> ( edits: WorkspaceEdit , usr: String ? ) {
235
- ( edits: . init( ) , usr: nil )
199
+ package func rename( _ request: RenameRequest ) async throws -> ( edits: WorkspaceEdit , usr: String ? ) {
200
+ ( edits: WorkspaceEdit ( ) , usr: nil )
236
201
}
237
202
238
203
package func editsToRename(
@@ -250,9 +215,7 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
250
215
nil
251
216
}
252
217
253
- package func indexedRename(
254
- _ request: IndexedRenameRequest
255
- ) async throws -> WorkspaceEdit ? {
218
+ package func indexedRename( _ request: IndexedRenameRequest ) async throws -> WorkspaceEdit ? {
256
219
nil
257
220
}
258
221
@@ -264,16 +227,12 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
264
227
[ ]
265
228
}
266
229
267
- package func executeCommand(
268
- _ req: ExecuteCommandRequest
269
- ) async throws -> LSPAny ? {
230
+ package func executeCommand( _ req: ExecuteCommandRequest ) async throws -> LSPAny ? {
270
231
nil
271
232
}
272
233
273
- package func getReferenceDocument(
274
- _ req: GetReferenceDocumentRequest
275
- ) async throws -> GetReferenceDocumentResponse {
276
- . init( content: " " )
234
+ package func getReferenceDocument( _ req: GetReferenceDocumentRequest ) async throws -> GetReferenceDocumentResponse {
235
+ GetReferenceDocumentResponse ( content: " " )
277
236
}
278
237
279
238
package func syntacticDocumentTests(
0 commit comments