chore: autogen (vimdocs+formating)

This commit is contained in:
shadmansaleh 2022-04-30 10:11:22 +00:00 committed by github-actions[bot]
parent 1cdddc2456
commit 030eb62bc4
2 changed files with 12 additions and 2 deletions

View File

@ -375,6 +375,9 @@ General component options These are options that control behavior
-- As table it must contain the icon as first entry and can use
-- color option to custom color the icon. Example:
-- {'branch', icon = ''} / {'branch', icon = {'', color={fg='green'}}}
-- icon position can also be set to the right side from table. Example:
-- {'branch', icon = {'', align='right', color={fg='green'}}}
icon = nil,
separator = nil, -- Determines what separator to use for the component.
@ -590,7 +593,10 @@ Component specific options These are options that are available on
{
'filetype',
colored = true, -- Displays filetype icon in color if set to true
icon_only = false -- Display only an icon for filetype
icon_only = false, -- Display only an icon for filetype
icon = { align = 'right' }, -- Display filetype icon on the right hand side
-- icon = {'X', align='right'}
-- Icon string ^ in table is ignored in filetype component
}
}
}

View File

@ -115,7 +115,11 @@ function M:apply_icon()
if type(icon) == 'table' then
icon = icon[1]
end
if self.options.icon_color_highlight and type(self.options.icon) == 'table' and self.options.icon.align == 'right' then
if
self.options.icon_color_highlight
and type(self.options.icon) == 'table'
and self.options.icon.align == 'right'
then
self.status = table.concat {
self.status,
' ',