mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-25 08:54:50 +01:00
fix: buffers command, some ux in cmds
This commit is contained in:
parent
493f599ec2
commit
06fa78e6cc
1 changed files with 13 additions and 6 deletions
|
@ -20,8 +20,9 @@ local base_actions = {
|
|||
require('codemp.window').toggle()
|
||||
end,
|
||||
|
||||
connect = function(host)
|
||||
client.connect(host)
|
||||
connect = function()
|
||||
client.connect()
|
||||
print(" ++ connected")
|
||||
end,
|
||||
}
|
||||
|
||||
|
@ -107,7 +108,13 @@ local joined_actions = {
|
|||
end,
|
||||
|
||||
buffers = function()
|
||||
workspace.open_buffer_tree()
|
||||
for _, buf in ipairs(session.workspace:filetree()) do
|
||||
if buffers.map_rev[buf] ~= nil then
|
||||
print(" +- " .. buf)
|
||||
else
|
||||
print(" -- " .. buf)
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
sync = function()
|
||||
|
@ -204,10 +211,10 @@ vim.api.nvim_create_user_command(
|
|||
elseif stage == 3 then
|
||||
if args[#args-1] == 'attach' or args[#args-1] == 'detach' then
|
||||
if session.client ~= nil and session.workspace ~= nil then
|
||||
if session.workspace ~= nil then
|
||||
return filter(lead, session.workspace:filetree())
|
||||
end
|
||||
end
|
||||
elseif args[#args-1] == 'join' then
|
||||
return filter(lead, session.available)
|
||||
end
|
||||
|
||||
return {}
|
||||
|
|
Loading…
Reference in a new issue