fix: filetype icon not updating with file change (#119)
This commit is contained in:
parent
ed7d186987
commit
d019c04afc
|
@ -6,12 +6,12 @@ local function filetype(options)
|
|||
local data = vim.bo.filetype
|
||||
if #data > 0 then
|
||||
local ok, devicons = pcall(require,'nvim-web-devicons')
|
||||
if ok and not options.icon then
|
||||
if ok then
|
||||
local f_name,f_extension = vim.fn.expand('%:t'),vim.fn.expand('%:e')
|
||||
options.icon = devicons.get_icon(f_name,f_extension)
|
||||
else
|
||||
ok = vim.fn.exists("*WebDevIconsGetFileTypeSymbol")
|
||||
if ok ~= 0 and not options.icon then
|
||||
if ok ~= 0 then
|
||||
options.icon = vim.fn.WebDevIconsGetFileTypeSymbol()
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue