Buffer separator option
This commit is contained in:
committed by
Olivier Roques
parent
2e5279b1aa
commit
8b6d209262
@@ -16,7 +16,7 @@ M.options = {
|
||||
bufferline_settings = {
|
||||
exclude_terminal = false,
|
||||
show_index = false,
|
||||
separator = true,
|
||||
separator = '|',
|
||||
},
|
||||
theme = 'default',
|
||||
sections = {
|
||||
@@ -168,14 +168,10 @@ function M.update_bufferline()
|
||||
local sections = {}
|
||||
local settings = M.options.bufferline_settings
|
||||
local buffers = bufferline.get_buffers(settings)
|
||||
local separator = ''
|
||||
if M.options.bufferline_settings.separator then
|
||||
separator = '|'
|
||||
end
|
||||
for i, buffer in ipairs(buffers) do
|
||||
table.insert(sections, bufferline.to_section(buffer, i, settings))
|
||||
if i < #buffers then
|
||||
table.insert(sections, separator)
|
||||
table.insert(sections, M.options.bufferline_settings.separator)
|
||||
end
|
||||
end
|
||||
return table.concat(highlight_sections(sections))
|
||||
|
||||
Reference in New Issue
Block a user