mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-24 08:24:53 +01:00
feat: mark followed user
This commit is contained in:
parent
a98763217a
commit
fe1f4b456d
3 changed files with 7 additions and 1 deletions
|
@ -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")
|
||||
|
|
|
@ -46,7 +46,11 @@ M.icon = function(config, node, state)
|
|||
highlight = highlights.DIRECTORY_ICON
|
||||
end
|
||||
elseif node.type == "user" then
|
||||
if node.name == CODEMP.following then
|
||||
icon = "="
|
||||
else
|
||||
icon = ":"
|
||||
end
|
||||
highlight = codemp_utils.color(node.name).bg
|
||||
elseif node.type == "entry" then
|
||||
icon = "$"
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue