feat: mark followed user

This commit is contained in:
əlemi 2024-09-25 04:10:48 +02:00
parent a98763217a
commit fe1f4b456d
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 7 additions and 1 deletions

View file

@ -73,6 +73,7 @@ M.open = function(state, path, extra)
vim.api.nvim_win_set_cursor(win, { usr.pos[1] + 1, usr.pos[2] })
end
end
manager.refresh("codemp")
return
end
error("unrecognized node type")

View file

@ -46,7 +46,11 @@ M.icon = function(config, node, state)
highlight = highlights.DIRECTORY_ICON
end
elseif node.type == "user" then
icon = ":"
if node.name == CODEMP.following then
icon = "="
else
icon = ":"
end
highlight = codemp_utils.color(node.name).bg
elseif node.type == "entry" then
icon = "$"

View file

@ -47,6 +47,7 @@ local function register_cursor_callback(ws)
elseif CODEMP.following ~= nil then
print(" / / unfollowing " .. CODEMP.following)
CODEMP.following = nil
require('codemp.window').update()
end
local cur = utils.cursor.position()
local buf = vim.api.nvim_get_current_buf()