feat: config to remove icon padding (#145)
This commit is contained in:
parent
eaa20a6aee
commit
b24380c0e1
4 changed files with 18 additions and 5 deletions
|
|
@ -208,16 +208,18 @@ if has_devicons then
|
|||
type = meta.link_stat.type
|
||||
end
|
||||
end
|
||||
local icon, hl
|
||||
if type == "directory" then
|
||||
local icon = conf and conf.directory or " "
|
||||
return { icon, "OilDir" }
|
||||
icon = conf and conf.directory or ""
|
||||
hl = "OilDirIcon"
|
||||
else
|
||||
local icon
|
||||
local hl
|
||||
icon, hl = devicons.get_icon(name)
|
||||
icon = icon or (conf and conf.default_file or "")
|
||||
return { icon .. " ", hl }
|
||||
end
|
||||
if not conf or conf.add_padding ~= false then
|
||||
icon = icon .. " "
|
||||
end
|
||||
return { icon, hl }
|
||||
end,
|
||||
|
||||
parse = function(line, conf)
|
||||
|
|
|
|||
|
|
@ -625,6 +625,11 @@ M._get_highlights = function()
|
|||
link = "Directory",
|
||||
desc = "Directories in an oil buffer",
|
||||
},
|
||||
{
|
||||
name = "OilDirIcon",
|
||||
link = "OilDir",
|
||||
desc = "Icon for directories",
|
||||
},
|
||||
{
|
||||
name = "OilSocket",
|
||||
link = "Keyword",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue