@@ -20,7 +20,14 @@ local function refresh_icons()
2020 icons_by_file_prefix = theme .icons_by_file_prefix
2121 icons_by_file_extension = theme .icons_by_file_extension
2222 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+ )
2431end
2532
2633-- Map of filetypes -> icon names
@@ -336,8 +343,14 @@ function M.setup(opts)
336343 local user_file_pre_icons = user_icons .override_by_prefix
337344 local user_file_ext_icons = user_icons .override_by_extension
338345
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+ )
341354
342355 if user_filename_icons then
343356 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)
432445 local is_strict = if_nil (opts and opts .strict , global_opts .strict )
433446 local icon_data
434447 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 )
436452 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 )
438457 end
439458
440459 if icon_data then
@@ -462,9 +481,15 @@ function M.get_icon_colors(name, pre_or_ext, opts)
462481 local is_strict = if_nil (opts and opts .strict , global_opts .strict )
463482 local icon_data
464483 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 )
466488 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 )
468493 end
469494
470495 if icon_data then
0 commit comments