2021-02-15 18:09:12 +00:00
|
|
|
-- Copyright (c) 2020-2021 shadmansaleh
|
2021-02-13 00:03:57 +00:00
|
|
|
-- MIT license, see LICENSE for more details.
|
2021-09-25 17:15:42 +00:00
|
|
|
local M = require('lualine.component'):extend()
|
2021-04-11 08:20:41 +00:00
|
|
|
|
2021-09-03 18:20:34 +00:00
|
|
|
-- stylua: ignore
|
2021-09-25 17:15:42 +00:00
|
|
|
M.icon = {
|
2021-04-11 08:20:41 +00:00
|
|
|
unix = '', -- e712
|
2021-09-03 18:20:34 +00:00
|
|
|
dos = '', -- e70f
|
|
|
|
mac = '' -- e711
|
2021-04-11 08:20:41 +00:00
|
|
|
}
|
|
|
|
|
2021-09-25 17:15:42 +00:00
|
|
|
M.update_status = function(self)
|
2021-04-11 08:20:41 +00:00
|
|
|
if self.options.icons_enabled and not self.options.icon then
|
|
|
|
local format = vim.bo.fileformat
|
2021-09-25 17:15:42 +00:00
|
|
|
return M.icon[format] or format
|
2021-02-15 18:09:12 +00:00
|
|
|
end
|
2021-04-11 08:20:41 +00:00
|
|
|
return vim.bo.fileformat
|
2020-12-30 14:48:51 +00:00
|
|
|
end
|
|
|
|
|
2021-09-25 17:15:42 +00:00
|
|
|
return M
|