mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 15:34:53 +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()
|
require('codemp.window').toggle()
|
||||||
end,
|
end,
|
||||||
|
|
||||||
connect = function(host)
|
connect = function()
|
||||||
client.connect(host)
|
client.connect()
|
||||||
|
print(" ++ connected")
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +108,13 @@ local joined_actions = {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
buffers = function()
|
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,
|
end,
|
||||||
|
|
||||||
sync = function()
|
sync = function()
|
||||||
|
@ -204,10 +211,10 @@ vim.api.nvim_create_user_command(
|
||||||
elseif stage == 3 then
|
elseif stage == 3 then
|
||||||
if args[#args-1] == 'attach' or args[#args-1] == 'detach' then
|
if args[#args-1] == 'attach' or args[#args-1] == 'detach' then
|
||||||
if session.client ~= nil and session.workspace ~= nil then
|
if session.client ~= nil and session.workspace ~= nil then
|
||||||
if session.workspace ~= nil then
|
|
||||||
return filter(lead, session.workspace:filetree())
|
return filter(lead, session.workspace:filetree())
|
||||||
end
|
end
|
||||||
end
|
elseif args[#args-1] == 'join' then
|
||||||
|
return filter(lead, session.available)
|
||||||
end
|
end
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
Loading…
Reference in a new issue