File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Sources/SourceKit/sourcekitd Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -345,12 +345,12 @@ extension SwiftLanguageServer {
345
345
346
346
let filterName : String ? = value [ self . keys. name]
347
347
let insertText : String ? = value [ self . keys. sourcetext]
348
+ let typeName : String ? = value [ self . keys. typename]
348
349
349
350
let kind : sourcekitd_uid_t ? = value [ self . keys. kind]
350
-
351
351
result. items. append ( CompletionItem (
352
352
label: name,
353
- detail: nil ,
353
+ detail: typeName ,
354
354
sortText: nil ,
355
355
filterText: filterName,
356
356
textEdit: nil ,
Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ struct sourcekitd_keys {
206
206
let filepath : sourcekitd_uid_t
207
207
let ranges : sourcekitd_uid_t
208
208
let usr : sourcekitd_uid_t
209
+ let typename : sourcekitd_uid_t
209
210
let annotated_decl : sourcekitd_uid_t
210
211
let doc_full_as_xml : sourcekitd_uid_t
211
212
let syntactic_only : sourcekitd_uid_t
@@ -233,6 +234,7 @@ struct sourcekitd_keys {
233
234
filepath = api. uid_get_from_cstr ( " key.filepath " ) !
234
235
ranges = api. uid_get_from_cstr ( " key.ranges " ) !
235
236
usr = api. uid_get_from_cstr ( " key.usr " ) !
237
+ typename = api. uid_get_from_cstr ( " key.typename " ) !
236
238
annotated_decl = api. uid_get_from_cstr ( " key.annotated_decl " ) !
237
239
doc_full_as_xml = api. uid_get_from_cstr ( " key.doc.full_as_xml " ) !
238
240
syntactic_only = api. uid_get_from_cstr ( " key.syntactic_only " ) !
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ final class LocalSwiftTests: XCTestCase {
186
186
XCTAssertNotNil ( abc)
187
187
if let abc = abc {
188
188
XCTAssertEqual ( abc. kind, . property)
189
- XCTAssertNil ( abc. detail)
189
+ XCTAssertEqual ( abc. detail, " Int " )
190
190
XCTAssertEqual ( abc. filterText, " abc " )
191
191
// FIXME:
192
192
XCTAssertNil ( abc. textEdit)
@@ -197,7 +197,7 @@ final class LocalSwiftTests: XCTestCase {
197
197
XCTAssertNotNil ( test)
198
198
if let test = test {
199
199
XCTAssertEqual ( test. kind, . method)
200
- XCTAssertNil ( test. detail)
200
+ XCTAssertEqual ( test. detail, " Void " )
201
201
XCTAssertEqual ( test. filterText, " test(a:) " )
202
202
// FIXME:
203
203
XCTAssertNil ( test. textEdit)
You can’t perform that action at this time.
0 commit comments