mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 07:24:52 +01:00
feat: show users before buffers
so its visible even on very long buffer names
This commit is contained in:
parent
222869464f
commit
2f3132b82d
2 changed files with 6 additions and 4 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,8 @@ M.default_config = {
|
||||||
buffer = {
|
buffer = {
|
||||||
{ "indent" },
|
{ "indent" },
|
||||||
{ "icon" },
|
{ "icon" },
|
||||||
{ "name" },
|
|
||||||
{ "spacer" },
|
|
||||||
{ "users" },
|
{ "users" },
|
||||||
|
{ "name" },
|
||||||
},
|
},
|
||||||
entry = {
|
entry = {
|
||||||
{ "indent" },
|
{ "indent" },
|
||||||
|
|
Loading…
Reference in a new issue