From b561802109ce41607f1b96adcb71e69637cf7bb7 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 26 Sep 2024 16:21:14 +0200 Subject: [PATCH] feat: 'a' on title refreshes workspace list --- lua/codemp/neo-tree/commands.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/codemp/neo-tree/commands.lua b/lua/codemp/neo-tree/commands.lua index 9126c1b..40adf6e 100644 --- a/lua/codemp/neo-tree/commands.lua +++ b/lua/codemp/neo-tree/commands.lua @@ -22,9 +22,15 @@ M.refresh = require("neo-tree.utils").wrap(manager.refresh, "codemp") 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 == "entry" then return end if selected.type == "root" then return toggle(selected) end + if selected.type == "title" then + if CODEMP.client ~= nil then + print(" :: refreshing workspace list") + ws_manager.list() + end + return + end if selected.type == "button" then if selected.name == "[connect]" and CODEMP.client == nil then client_manager.connect()