fix: remove nonicons custom impl
This commit is contained in:
parent
07ae3a8dc3
commit
b0f44d3af6
1 changed files with 0 additions and 26 deletions
|
|
@ -945,32 +945,6 @@ M.get_icon_provider = function()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local has_nonicons, nonicons = pcall(require, 'nonicons')
|
|
||||||
if has_nonicons and type(nonicons.get) == 'function' then
|
|
||||||
return function(type, name, conf, ft)
|
|
||||||
if type == 'directory' then
|
|
||||||
local icon = nonicons.get('file-directory')
|
|
||||||
return icon or (conf and conf.directory or ''), 'OilDirIcon'
|
|
||||||
else
|
|
||||||
if ft then
|
|
||||||
local ft_icon = nonicons.get(ft)
|
|
||||||
if ft_icon then
|
|
||||||
return ft_icon, 'OilFileIcon'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local ext = name:match('%.([^%.]+)$')
|
|
||||||
if ext then
|
|
||||||
local ext_icon = nonicons.get(ext)
|
|
||||||
if ext_icon then
|
|
||||||
return ext_icon, 'OilFileIcon'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local icon = nonicons.get('file')
|
|
||||||
return icon or (conf and conf.default_file or ''), 'OilFileIcon'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local has_devicons, devicons = pcall(require, 'nvim-web-devicons')
|
local has_devicons, devicons = pcall(require, 'nvim-web-devicons')
|
||||||
if has_devicons then
|
if has_devicons then
|
||||||
return function(type, name, conf, ft)
|
return function(type, name, conf, ft)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue