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