tui: show LSP diagnostics inline when viewing files so users can see type errors and compilation issues without leaving the interface

This commit is contained in:
Dax Raad
2025-11-11 12:15:33 -05:00
parent 140498eb4f
commit b0b7fd143b
2 changed files with 30 additions and 1 deletions

View File

@@ -193,10 +193,10 @@ export namespace LSP {
}
export async function touchFile(input: string, waitForDiagnostics?: boolean) {
log.info("touching file", { file: input })
const clients = await getClients(input)
await run(async (client) => {
if (!clients.includes(client)) return
const wait = waitForDiagnostics ? client.waitForDiagnostics({ path: input }) : Promise.resolve()
await client.notify.open({ path: input })
return wait