Open frolvanya opened 6 months ago
I tried doing removing the separator for tabline:
tabline = {
lualine_a = {
{
"tabs",
separator = "",
mode = 2,
path = 0,
},
},
},
Unfortunately did not work. I guess that's for the entire component, not the separator in between tabs.
You might be able to give the buffer component it's own explicit separators?
{
"buffers",
-- separators = { left = "", right = "" },
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
}
Alternatively, you could use the process_sections
function from the master/examples/slanted-gaps.lua example theme if you need to modify the separators for all of the components in one of the tabline/statusline sections.
This has been what I have used for while.
---Override separators for all components
---@param sections table
---@return table
local function process_sections(sections)
for _, section in pairs(sections) do
for id, comp in ipairs(section) do
if type(comp) ~= "table" then
comp = { comp }
section[id] = comp
end
comp.component_separators = { left = "", right = "" }
comp.section_separators = { left = "", right = "" }
end
end
return sections
end
If you're using lazy.nvim, you pass this into the config function and overwrite the opts.tabline
table before loading lualine.
config = function(_, opts)
-- NOTE: Modify separators before loading plugin
-- opts.sections = process_sections(opts.sections)
opts.tabline = process_sections(opts.tabline)
require("lualine").setup(opts)
end
Requested feature
Right now we can set component separator for both sections and tabline using one option field called
component_separators
. Can you, please, add a new field liketabline_separators
to provide more customization to users?Examples:
Motivation
I'd like to have '|' separator in sections (statusline) and empty separator in tabline