diff --git a/lua/lualine/components/filetype.lua b/lua/lualine/components/filetype.lua index 8d8f9c7..c8b17b3 100644 --- a/lua/lualine/components/filetype.lua +++ b/lua/lualine/components/filetype.lua @@ -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