@@ -173,10 +173,13 @@ func (c *completor) completeTableScanField(ctx context.Context, tableScanNode *r
173
173
if strings .HasPrefix (tableScanNode .Alias (), incompleteColumnName ) {
174
174
return []CompletionItem {
175
175
{
176
- Kind : lsp .CIKField ,
177
- NewText : tableScanNode .Alias (),
178
- Documentation : tableScanNode .Table ().FullName (),
179
- TypedPrefix : incompleteColumnName ,
176
+ Kind : lsp .CIKField ,
177
+ NewText : tableScanNode .Alias (),
178
+ Documentation : lsp.MarkupContent {
179
+ Kind : lsp .MKPlainText ,
180
+ Value : tableScanNode .Table ().FullName (),
181
+ },
182
+ TypedPrefix : incompleteColumnName ,
180
183
},
181
184
}
182
185
}
@@ -277,10 +280,13 @@ func (c *completor) completeProjectForTablePath(ctx context.Context, param table
277
280
}
278
281
279
282
result = append (result , CompletionItem {
280
- Kind : lsp .CIKModule ,
281
- NewText : p .ProjectId ,
282
- Documentation : p .Name ,
283
- TypedPrefix : param .ProjectID ,
283
+ Kind : lsp .CIKModule ,
284
+ NewText : p .ProjectId ,
285
+ Documentation : lsp.MarkupContent {
286
+ Kind : lsp .MKPlainText ,
287
+ Value : p .Name ,
288
+ },
289
+ TypedPrefix : param .ProjectID ,
284
290
})
285
291
}
286
292
@@ -300,10 +306,13 @@ func (c *completor) completeDatasetForTablePath(ctx context.Context, param table
300
306
}
301
307
302
308
result = append (result , CompletionItem {
303
- Kind : lsp .CIKModule ,
304
- NewText : d .DatasetID ,
305
- Documentation : fmt .Sprintf ("%s.%s" , d .ProjectID , d .DatasetID ),
306
- TypedPrefix : param .DatasetID ,
309
+ Kind : lsp .CIKModule ,
310
+ NewText : d .DatasetID ,
311
+ Documentation : lsp.MarkupContent {
312
+ Kind : lsp .MKPlainText ,
313
+ Value : fmt .Sprintf ("%s.%s" , d .ProjectID , d .DatasetID ),
314
+ },
315
+ TypedPrefix : param .DatasetID ,
307
316
})
308
317
}
309
318
@@ -323,10 +332,13 @@ func (c *completor) completeTableForTablePath(ctx context.Context, param tablePa
323
332
}
324
333
325
334
result = append (result , CompletionItem {
326
- Kind : lsp .CIKModule ,
327
- NewText : t .TableID ,
328
- Documentation : fmt .Sprintf ("%s.%s.%s" , t .ProjectID , t .DatasetID , t .TableID ),
329
- TypedPrefix : param .TableID ,
335
+ Kind : lsp .CIKModule ,
336
+ NewText : t .TableID ,
337
+ Documentation : lsp.MarkupContent {
338
+ Kind : lsp .MKPlainText ,
339
+ Value : fmt .Sprintf ("%s.%s.%s" , t .ProjectID , t .DatasetID , t .TableID ),
340
+ },
341
+ TypedPrefix : param .TableID ,
330
342
})
331
343
}
332
344
@@ -426,10 +438,13 @@ type columnInterface interface {
426
438
427
439
func createCompletionItemFromColumn (column columnInterface , incompleteColumnName string ) CompletionItem {
428
440
return CompletionItem {
429
- Kind : lsp .CIKField ,
430
- NewText : column .Name (),
431
- Documentation : column .Type ().TypeName (types .ProductExternal ),
432
- TypedPrefix : incompleteColumnName ,
441
+ Kind : lsp .CIKField ,
442
+ NewText : column .Name (),
443
+ Documentation : lsp.MarkupContent {
444
+ Kind : lsp .MKPlainText ,
445
+ Value : column .Type ().TypeName (types .ProductExternal ),
446
+ },
447
+ TypedPrefix : incompleteColumnName ,
433
448
}
434
449
}
435
450
@@ -439,9 +454,12 @@ func createCompletionItemFromSchema(schema *bq.FieldSchema, incompleteColumnName
439
454
detail += "\n " + schema .Description
440
455
}
441
456
return CompletionItem {
442
- Kind : lsp .CIKField ,
443
- NewText : schema .Name ,
444
- Documentation : detail ,
445
- TypedPrefix : incompleteColumnName ,
457
+ Kind : lsp .CIKField ,
458
+ NewText : schema .Name ,
459
+ Documentation : lsp.MarkupContent {
460
+ Kind : lsp .MKPlainText ,
461
+ Value : detail ,
462
+ },
463
+ TypedPrefix : incompleteColumnName ,
446
464
}
447
465
}
0 commit comments