fix: commands

This commit is contained in:
əlemi 2024-09-01 03:07:05 +02:00
parent 87dcb03b51
commit 1c68e6ec98
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -19,8 +19,8 @@ end
-- always available -- always available
local base_actions = { local base_actions = {
connect = function(host, bang) connect = function(host)
client.connect(host, bang) client.connect(host)
end, end,
} }
@ -42,7 +42,7 @@ local connected_actions = {
start = function(ws) start = function(ws)
if ws == nil then error("missing workspace name") end if ws == nil then error("missing workspace name") end
session.client:create_workspace(ws):await() session.client:create_workspace(ws):await()
vim.schedule(function () workspace.list(session.client) end) vim.schedule(function () workspace.list() end)
print(" <> created workspace " .. ws) print(" <> created workspace " .. ws)
end, end,
@ -89,7 +89,7 @@ local joined_actions = {
local buf = vim.api.nvim_get_current_buf() local buf = vim.api.nvim_get_current_buf()
buffers.create(path) buffers.create(path)
local content = utils.buffer.get_content(buf) local content = utils.buffer.get_content(buf)
buffers.attach(path, true, content) buffers.attach(path, buf, content)
window.update() -- TODO would be nice to do automatically inside window.update() -- TODO would be nice to do automatically inside
else else
print(" !! empty path or open a file") print(" !! empty path or open a file")