Skip to content

refactor: extract LSP diagnostic report formatter#21964

Merged
kitlangton merged 1 commit intodevfrom
refactor/lsp-diagnostics-utility
Apr 11, 2026
Merged

refactor: extract LSP diagnostic report formatter#21964
kitlangton merged 1 commit intodevfrom
refactor/lsp-diagnostics-utility

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

Adds LSP.Diagnostic.report(file, issues) next to the existing LSP.Diagnostic.pretty to centralize the filter / cap / <diagnostics>-block formatting that was duplicated across write, edit, and apply_patch.

Call sites keep control over their surrounding header text ("in this file", "in other files", "in {rel}") since that's the only real variation.

Net −11 lines, no new files.

Test plan

  • bun run typecheck in packages/opencode

Adds LSP.Diagnostic.report(file, issues) to centralize the filter/cap/
format logic that was duplicated across write, edit, and apply_patch.
Call sites keep control over the surrounding header text.
@kitlangton kitlangton merged commit a17ac02 into dev Apr 11, 2026
11 of 12 checks passed
@kitlangton kitlangton deleted the refactor/lsp-diagnostics-utility branch April 11, 2026 02:00
mrsimpson pushed a commit to mrsimpson/opencode that referenced this pull request Apr 14, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant