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-04-11 08:20:41 +00:00
|
|
|
local FileFormat = require('lualine.component'):new()
|
|
|
|
|
|
|
|
FileFormat.icon = {
|
|
|
|
unix = '', -- e712
|
|
|
|
dos = '', -- e70f
|
|
|
|
mac = '' -- e711
|
|
|
|
}
|
|
|
|
|
|
|
|
FileFormat.update_status = function(self)
|
|
|
|
if self.options.icons_enabled and not self.options.icon then
|
|
|
|
local format = vim.bo.fileformat
|
|
|
|
return FileFormat.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-04-11 08:20:41 +00:00
|
|
|
return FileFormat
|