@@ -248,6 +248,8 @@ function autocomplete.get_draw_fn()
248
248
return autocomplete .render_item_simple
249
249
elseif autocmp_config .draw == ' reversed' then
250
250
return autocomplete .render_item_reversed
251
+ elseif autocmp_config .draw == ' minimal' then
252
+ return autocomplete .render_item_minimal
251
253
end
252
254
error (' Invalid autocomplete window draw config' )
253
255
end
@@ -260,6 +262,7 @@ function autocomplete.render_item_simple(ctx)
260
262
{ ctx .kind_icon , ctx .icon_gap , hl_group = ' BlinkCmpKind' .. ctx .kind },
261
263
{
262
264
ctx .item .label ,
265
+ ctx .kind == ' Snippet' and ' ~' or nil ,
263
266
fill = true ,
264
267
hl_group = ctx .deprecated and ' BlinkCmpLabelDeprecated' or ' BlinkCmpLabel' ,
265
268
max_width = 50 ,
@@ -275,6 +278,7 @@ function autocomplete.render_item_reversed(ctx)
275
278
' ' ,
276
279
{
277
280
ctx .item .label ,
281
+ ctx .kind == ' Snippet' and ' ~' or nil ,
278
282
fill = true ,
279
283
hl_group = ctx .deprecated and ' BlinkCmpLabelDeprecated' or ' BlinkCmpLabel' ,
280
284
max_width = 50 ,
@@ -285,6 +289,22 @@ function autocomplete.render_item_reversed(ctx)
285
289
}
286
290
end
287
291
292
+ function autocomplete .render_item_minimal (ctx )
293
+ return {
294
+ ' ' ,
295
+ {
296
+ ctx .item .label ,
297
+ ctx .kind == ' Snippet' and ' ~' or nil ,
298
+ fill = true ,
299
+ hl_group = ctx .deprecated and ' BlinkCmpLabelDeprecated' or ' BlinkCmpLabel' ,
300
+ max_width = 50 ,
301
+ },
302
+ ' ' ,
303
+ { ctx .kind , hl_group = ' BlinkCmpKind' .. ctx .kind },
304
+ ' ' ,
305
+ }
306
+ end
307
+
288
308
--- @return blink.cmp.CompletionItem ?
289
309
function autocomplete .get_selected_item ()
290
310
if not autocomplete .win :is_open () then return end
0 commit comments