feat: show users before buffers

so its visible even on very long buffer names
This commit is contained in:
əlemi 2024-10-02 23:02:26 +02:00
parent 222869464f
commit 2f3132b82d
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 6 additions and 4 deletions

View file

@ -97,12 +97,15 @@ M.users = function(config, node, state)
for user, buf in pairs(codemp_buffers.users) do for user, buf in pairs(codemp_buffers.users) do
if buf == node.name then if buf == node.name then
table.insert(out, { table.insert(out, {
text = " ", text = string.sub(user, 0, 1),
highlight = codemp_utils.color(user).bg, highlight = codemp_utils.color(user).bg,
align = "end",
}) })
end end
end end
table.insert(out, {
text = " ",
highlight = highlights.NORMAL,
})
return out return out
end end

View file

@ -38,9 +38,8 @@ M.default_config = {
buffer = { buffer = {
{ "indent" }, { "indent" },
{ "icon" }, { "icon" },
{ "name" },
{ "spacer" },
{ "users" }, { "users" },
{ "name" },
}, },
entry = { entry = {
{ "indent" }, { "indent" },