codemp-nvim/lua/codemp/client.lua

19 lines
551 B
Lua
Raw Normal View History

2024-08-24 01:57:00 +02:00
local session = require("codemp.session")
local workspace = require("codemp.workspace")
2024-09-16 18:27:23 +02:00
local function connect()
if CODEMP.config.username == nil then
CODEMP.config.username = vim.g.codemp_username or vim.fn.input("username > ", "")
end
if CODEMP.config.password == nil then
CODEMP.config.password = vim.g.codemp_password or vim.fn.input("password > ", "")
end
session.client = CODEMP.native.connect(CODEMP.config):await()
require('codemp.window').update()
2024-09-01 03:06:27 +02:00
vim.schedule(function () workspace.list() end)
2024-08-24 01:57:00 +02:00
end
return {
connect = connect
}