@@ -20,7 +20,14 @@ local function refresh_icons()
20
20
icons_by_file_prefix = theme .icons_by_file_prefix
21
21
icons_by_file_extension = theme .icons_by_file_extension
22
22
icons_by_operating_system = theme .icons_by_operating_system
23
- icons = vim .tbl_extend (" keep" , {}, icons_by_filename , icons_by_file_prefix , icons_by_file_extension , icons_by_operating_system )
23
+ icons = vim .tbl_extend (
24
+ " keep" ,
25
+ {},
26
+ icons_by_filename ,
27
+ icons_by_file_prefix ,
28
+ icons_by_file_extension ,
29
+ icons_by_operating_system
30
+ )
24
31
end
25
32
26
33
-- Map of filetypes -> icon names
@@ -336,8 +343,14 @@ function M.setup(opts)
336
343
local user_file_pre_icons = user_icons .override_by_prefix
337
344
local user_file_ext_icons = user_icons .override_by_extension
338
345
339
- icons =
340
- vim .tbl_extend (" force" , icons , user_icons .override or {}, user_filename_icons or {}, user_file_pre_icons or {}, user_file_ext_icons or {})
346
+ icons = vim .tbl_extend (
347
+ " force" ,
348
+ icons ,
349
+ user_icons .override or {},
350
+ user_filename_icons or {},
351
+ user_file_pre_icons or {},
352
+ user_file_ext_icons or {}
353
+ )
341
354
342
355
if user_filename_icons then
343
356
icons_by_filename = vim .tbl_extend (" force" , icons_by_filename , user_filename_icons )
@@ -432,9 +445,15 @@ function M.get_icon(name, pre_or_ext, opts)
432
445
local is_strict = if_nil (opts and opts .strict , global_opts .strict )
433
446
local icon_data
434
447
if is_strict then
435
- icon_data = icons_by_filename [name ] or get_icon_by_prefix (name , pre_or_ext , opts ) or get_icon_by_extension (name , pre_or_ext , opts ) or (has_default and default_icon )
448
+ icon_data = icons_by_filename [name ]
449
+ or get_icon_by_prefix (name , pre_or_ext , opts )
450
+ or get_icon_by_extension (name , pre_or_ext , opts )
451
+ or (has_default and default_icon )
436
452
else
437
- icon_data = icons [name ] or get_icon_by_prefix (name , pre_or_ext , opts ) or get_icon_by_extension (name , pre_or_ext , opts ) or (has_default and default_icon )
453
+ icon_data = icons [name ]
454
+ or get_icon_by_prefix (name , pre_or_ext , opts )
455
+ or get_icon_by_extension (name , pre_or_ext , opts )
456
+ or (has_default and default_icon )
438
457
end
439
458
440
459
if icon_data then
@@ -462,9 +481,15 @@ function M.get_icon_colors(name, pre_or_ext, opts)
462
481
local is_strict = if_nil (opts and opts .strict , global_opts .strict )
463
482
local icon_data
464
483
if is_strict then
465
- icon_data = icons_by_filename [name ] or get_icon_by_prefix (name , pre_or_ext , opts ) or get_icon_by_extension (name , pre_or_ext , opts ) or (has_default and default_icon )
484
+ icon_data = icons_by_filename [name ]
485
+ or get_icon_by_prefix (name , pre_or_ext , opts )
486
+ or get_icon_by_extension (name , pre_or_ext , opts )
487
+ or (has_default and default_icon )
466
488
else
467
- icon_data = icons [name ] or get_icon_by_prefix (name , pre_or_ext , opts ) or get_icon_by_extension (name , pre_or_ext , opts ) or (has_default and default_icon )
489
+ icon_data = icons [name ]
490
+ or get_icon_by_prefix (name , pre_or_ext , opts )
491
+ or get_icon_by_extension (name , pre_or_ext , opts )
492
+ or (has_default and default_icon )
468
493
end
469
494
470
495
if icon_data then
0 commit comments