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-02-15 18:09:12 +00:00
|
|
|
local function fileformat(options)
|
|
|
|
local icon_linux = "" -- e712
|
|
|
|
local icon_windos = "" -- e70f
|
|
|
|
local icon_mac = "" -- e711
|
|
|
|
return function()
|
|
|
|
if options.icons_enabled and not options.icon then
|
|
|
|
local format = vim.bo.fileformat
|
|
|
|
if format == 'unix' then return icon_linux
|
|
|
|
elseif format == 'dos' then return icon_windos
|
|
|
|
elseif format == 'mac' then return icon_mac end
|
|
|
|
end
|
|
|
|
return vim.bo.fileformat
|
|
|
|
end
|
2020-12-30 14:48:51 +00:00
|
|
|
end
|
|
|
|
|
2021-02-15 18:09:12 +00:00
|
|
|
return { init = function(options) return fileformat(options) end }
|