mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 07:24:52 +01:00
feat: put back blocks at end, show fname
This commit is contained in:
parent
2f3132b82d
commit
3555572c2a
2 changed files with 12 additions and 6 deletions
|
@ -84,6 +84,13 @@ M.name = function(config, node, state)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.buffer = function(config, node, state)
|
||||||
|
return {
|
||||||
|
text = codemp_buffers.users[node.name],
|
||||||
|
highlight = highlights.FILE_ICON,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
M.spacer = function(config, node, state)
|
M.spacer = function(config, node, state)
|
||||||
return {
|
return {
|
||||||
text = " ",
|
text = " ",
|
||||||
|
@ -96,16 +103,13 @@ M.users = function(config, node, state)
|
||||||
-- TODO this is rather inefficient, maybe store reverse map precalculated?
|
-- TODO this is rather inefficient, maybe store reverse map precalculated?
|
||||||
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, {
|
|
||||||
text = string.sub(user, 0, 1),
|
|
||||||
highlight = codemp_utils.color(user).bg,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
table.insert(out, {
|
table.insert(out, {
|
||||||
text = " ",
|
text = " ",
|
||||||
highlight = highlights.NORMAL,
|
highlight = codemp_utils.color(user).bg,
|
||||||
|
align = "end",
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
return out
|
return out
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -34,12 +34,14 @@ M.default_config = {
|
||||||
{ "indent" },
|
{ "indent" },
|
||||||
{ "icon" },
|
{ "icon" },
|
||||||
{ "name" },
|
{ "name" },
|
||||||
|
{ "buffer" },
|
||||||
},
|
},
|
||||||
buffer = {
|
buffer = {
|
||||||
{ "indent" },
|
{ "indent" },
|
||||||
{ "icon" },
|
{ "icon" },
|
||||||
{ "users" },
|
|
||||||
{ "name" },
|
{ "name" },
|
||||||
|
{ "spacer" },
|
||||||
|
{ "users" },
|
||||||
},
|
},
|
||||||
entry = {
|
entry = {
|
||||||
{ "indent" },
|
{ "indent" },
|
||||||
|
|
Loading…
Reference in a new issue