mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-21 23:14:54 +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] })
|
vim.api.nvim_win_set_cursor(win, { usr.pos[1] + 1, usr.pos[2] })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
manager.refresh("codemp")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
error("unrecognized node type")
|
error("unrecognized node type")
|
||||||
|
|
|
@ -46,7 +46,11 @@ M.icon = function(config, node, state)
|
||||||
highlight = highlights.DIRECTORY_ICON
|
highlight = highlights.DIRECTORY_ICON
|
||||||
end
|
end
|
||||||
elseif node.type == "user" then
|
elseif node.type == "user" then
|
||||||
|
if node.name == CODEMP.following then
|
||||||
|
icon = "="
|
||||||
|
else
|
||||||
icon = ":"
|
icon = ":"
|
||||||
|
end
|
||||||
highlight = codemp_utils.color(node.name).bg
|
highlight = codemp_utils.color(node.name).bg
|
||||||
elseif node.type == "entry" then
|
elseif node.type == "entry" then
|
||||||
icon = "$"
|
icon = "$"
|
||||||
|
|
|
@ -47,6 +47,7 @@ local function register_cursor_callback(ws)
|
||||||
elseif CODEMP.following ~= nil then
|
elseif CODEMP.following ~= nil then
|
||||||
print(" / / unfollowing " .. CODEMP.following)
|
print(" / / unfollowing " .. CODEMP.following)
|
||||||
CODEMP.following = nil
|
CODEMP.following = nil
|
||||||
|
require('codemp.window').update()
|
||||||
end
|
end
|
||||||
local cur = utils.cursor.position()
|
local cur = utils.cursor.position()
|
||||||
local buf = vim.api.nvim_get_current_buf()
|
local buf = vim.api.nvim_get_current_buf()
|
||||||
|
|
Loading…
Reference in a new issue