show only filename if icon == nil

This commit is contained in:
2022-03-22 10:55:40 +03:00
parent d7f90f3382
commit 7f181c5f92

View File

@@ -22,6 +22,10 @@ local filename = {
local fileext = vim.fn.expand("%:e") local fileext = vim.fn.expand("%:e")
local icon = require("nvim-web-devicons").get_icon(filename, fileext) local icon = require("nvim-web-devicons").get_icon(filename, fileext)
if not icon then
return filename
end
return icon .. " " .. filename return icon .. " " .. filename
end, end,
} }