chore: autogen (vimdocs+formating)

This commit is contained in:
shadmansaleh 2022-05-20 00:48:48 +00:00 committed by github-actions[bot]
parent 36bf6963ae
commit d64152cf5c
3 changed files with 19 additions and 5 deletions

View File

@ -460,6 +460,8 @@ Component specific options These are options that are available on
mode = 0, -- 0: Shows buffer name mode = 0, -- 0: Shows buffer name
-- 1: Shows buffer index -- 1: Shows buffer index
-- 2: Shows buffer name + buffer index -- 2: Shows buffer name + buffer index
-- 3: Shows buffer number
-- 4: Shows buffer name + buffer number
max_length = vim.o.columns * 2 / 3, -- Maximum width of buffers component, max_length = vim.o.columns * 2 / 3, -- Maximum width of buffers component,
-- it can also be a function that returns -- it can also be a function that returns
@ -477,6 +479,12 @@ Component specific options These are options that are available on
active = 'lualine_{section}_normal', -- Color for active buffer. active = 'lualine_{section}_normal', -- Color for active buffer.
inactive = 'lualine_{section}_inactive', -- Color for inactive buffer. inactive = 'lualine_{section}_inactive', -- Color for inactive buffer.
}, },
symbols = {
modified = ' ●' -- Text to show when the buffer is modified
alternate_file = '#', -- Text to show to indify the alternate file
directory = '', -- Text to show when the buffer is a directory
},
} }
} }
} }

View File

@ -171,7 +171,14 @@ function Buffer:apply_mode(name)
end end
if self.options.mode == 2 then if self.options.mode == 2 then
return string.format('%s%s %s%s%s', self.alternate_file_icon, self.buf_index or '', self.icon, name, self.modified_icon) return string.format(
'%s%s %s%s%s',
self.alternate_file_icon,
self.buf_index or '',
self.icon,
name,
self.modified_icon
)
end end
if self.options.mode == 3 then if self.options.mode == 3 then
@ -180,7 +187,6 @@ function Buffer:apply_mode(name)
-- if self.options.mode == 4 then -- if self.options.mode == 4 then
return string.format('%s%s %s%s%s', self.alternate_file_icon, self.bufnr or '', self.icon, name, self.modified_icon) return string.format('%s%s %s%s%s', self.alternate_file_icon, self.bufnr or '', self.icon, name, self.modified_icon)
end end
return Buffer return Buffer

View File

@ -25,8 +25,8 @@ local default_options = {
symbols = { symbols = {
modified = '', modified = '',
alternate_file = '#', alternate_file = '#',
directory = '', directory = '',
} },
} }
-- This function is duplicated in tabs -- This function is duplicated in tabs