diff --git a/lua/codemp/neo-tree/components.lua b/lua/codemp/neo-tree/components.lua index 51df0cf..f9034db 100644 --- a/lua/codemp/neo-tree/components.lua +++ b/lua/codemp/neo-tree/components.lua @@ -84,6 +84,13 @@ M.name = function(config, node, state) } 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) return { text = " ", @@ -97,15 +104,12 @@ M.users = function(config, node, state) for user, buf in pairs(codemp_buffers.users) do if buf == node.name then table.insert(out, { - text = string.sub(user, 0, 1), + text = " ", highlight = codemp_utils.color(user).bg, + align = "end", }) end end - table.insert(out, { - text = " ", - highlight = highlights.NORMAL, - }) return out end diff --git a/lua/codemp/neo-tree/init.lua b/lua/codemp/neo-tree/init.lua index 144ad4f..ba889c4 100644 --- a/lua/codemp/neo-tree/init.lua +++ b/lua/codemp/neo-tree/init.lua @@ -34,12 +34,14 @@ M.default_config = { { "indent" }, { "icon" }, { "name" }, + { "buffer" }, }, buffer = { { "indent" }, { "icon" }, - { "users" }, { "name" }, + { "spacer" }, + { "users" }, }, entry = { { "indent" },