(input: string, waitForDiagnostics?: boolean)
| 242 | } |
| 243 | |
| 244 | export async function touchFile(input: string, waitForDiagnostics?: boolean) { |
| 245 | log.info("touching file", { file: input }) |
| 246 | const clients = await getClients(input) |
| 247 | await run(async (client) => { |
| 248 | if (!clients.includes(client)) return |
| 249 | const wait = waitForDiagnostics ? client.waitForDiagnostics({ path: input }) : Promise.resolve() |
| 250 | await client.notify.open({ path: input }) |
| 251 | |
| 252 | return wait |
| 253 | }).catch((err) => { |
| 254 | log.error("failed to touch file", { err, file: input }) |
| 255 | }) |
| 256 | } |
| 257 | |
| 258 | export async function diagnostics() { |
| 259 | const results: Record<string, LSPClient.Diagnostic[]> = {} |
nothing calls this directly
no test coverage detected