mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-22 15:34:49 +01:00
fix: properly print logs in nvim
This commit is contained in:
parent
2fde9659db
commit
a872c39d7f
3 changed files with 11 additions and 5 deletions
|
@ -67,7 +67,13 @@ vim.api.nvim_create_user_command('Connect',
|
|||
bin_args,
|
||||
{
|
||||
rpc = true,
|
||||
on_stderr = function(_, data, _) print(vim.fn.join(data, "\n")) end,
|
||||
on_stderr = function(_, data, _)
|
||||
for _, line in pairs(data) do
|
||||
print(line)
|
||||
end
|
||||
-- print(vim.fn.join(data, "\n"))
|
||||
end,
|
||||
stderr_buffered = false,
|
||||
}
|
||||
)
|
||||
if M.jobid <= 0 then
|
||||
|
|
|
@ -238,18 +238,17 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
}
|
||||
|
||||
let client = BufferClient::connect(args.host).await?;
|
||||
debug!("client connected");
|
||||
|
||||
let handler: NeovimHandler = NeovimHandler {
|
||||
client: client.into(),
|
||||
};
|
||||
|
||||
let (nvim, io_handler) = create::new_parent(handler).await;
|
||||
let (_nvim, io_handler) = create::new_parent(handler).await;
|
||||
|
||||
nvim.out_write("[*] codemp loaded").await?;
|
||||
info!("++ codemp started");
|
||||
|
||||
if let Err(e) = io_handler.await? {
|
||||
error!("[!] worker stopped with error: {}", e);
|
||||
error!("worker stopped with error: {}", e);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
|
@ -132,6 +132,7 @@ impl CodempClient {
|
|||
|
||||
pub fn detach(&mut self, path: String) {
|
||||
self.factories.write().unwrap().remove(&path);
|
||||
info!("|| detached from buffer");
|
||||
}
|
||||
|
||||
async fn sync(&mut self, path: String) -> Result<String, Status> {
|
||||
|
|
Loading…
Reference in a new issue