Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/opencode/src/lsp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,11 @@ export namespace LSP {

export async function diagnostics() {
const results: Record<string, LSPClient.Diagnostic[]> = {}
for (const result of await runAll(async (client) => client.diagnostics)) {
const clients = await state().then((x) => x.clients)
for (const client of clients) {
const result = await client.diagnostics
for (const [path, diagnostics] of result.entries()) {
if (!path.startsWith(client.root)) continue
const arr = results[path] || []
arr.push(...diagnostics)
results[path] = arr
Expand Down
Loading