From 8b6d209262da02c56849eaf110609d89d3d8fe15 Mon Sep 17 00:00:00 2001 From: Alessandro Morelli Date: Wed, 7 Jul 2021 01:03:05 +0200 Subject: [PATCH] Buffer separator option --- lua/hardline.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lua/hardline.lua b/lua/hardline.lua index 636d4e5..eeff5a2 100644 --- a/lua/hardline.lua +++ b/lua/hardline.lua @@ -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))