fix(neotree): text and action

This commit is contained in:
əlemi 2024-09-07 04:26:21 +02:00
parent 3f4414dd25
commit dfb3f0458a
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 7 additions and 2 deletions

View file

@ -14,7 +14,8 @@ M.open = function(state, path, extra)
local selected = state.tree:get_node()
if selected.type == "spacer" then return end
if selected.type == "title" then return end
if selected.type == "root" then
if selected.type == "root" then selected:toggle() end
if selected.type == "button" then
if selected.name == "[connect]" and session.client == nil then
client_manager.connect()
end

View file

@ -48,7 +48,10 @@ M.icon = function(config, node, state)
highlight = codemp_utils.color(node.name)
elseif node.type == "entry" then
icon = "$"
highlight = highlight.GIT_STAGED
highlight = highlights.GIT_STAGED
elseif node.type == "button" then
icon = " "
highlight = highlights.NORMAL
end
return {

View file

@ -49,6 +49,7 @@ M.default_config = {
},
button = {
{ "indent" },
{ "icon" },
{ "name" },
},
},