latex-lsp/index.ts
2023-12-31 15:33:43 +00:00

21 lines
519 B
TypeScript

import fs from 'fs';
import process from 'process';
import { diagnosticsRequests, getDiagnostics, parseLsp } from './parser';
import { add_personal } from './languagetool';
if (process.argv.length !== 3) {
console.log("Please provide only one pass");
process.exit(1);
}
const file = fs.readFileSync(process.argv[2]).toString();
const res = parseLsp(file);
fs.writeFileSync('./res', res.text);
//const diag = await diagnosticsRequests(res);
const diag = await getDiagnostics(file);
//add_personal(['AutoML']);