latex-lsp/lsp_run.ts

26 lines
470 B
TypeScript

import { error, handleData, log } from "./lsp";
console.log = log;
log('Started the server logging');
try {
log('Listening for Input')
process.stdin.resume();
} catch (e: any) {
log('failed to listen to the stdin');
log(e.toString());
throw e;
}
process.stdin.on('data', function(data) {
log('Got the data function');
try {
handleData(data);
} catch (e) {
log("got here")
error("TRY GOT ERROR:" + e)
}
})