Repository navigation
Conversation
KKdev15
force-pushed
the
feat/lsp-min-severity
branch
from
March 17, 2026 01:46
1c3bf7d to
e42fc74
Compare
KKdev15
marked this pull request as draft
March 17, 2026 01:49
Add configurable minimum severity level for LSP diagnostics on a
per-LSP basis. This allows users to see warnings, info, and hints
from specific LSP servers, not just errors.
Example config:
{
"lsp": {
"markdownlint": {
"command": ["markdownlint-lsp"],
"extensions": [".md"],
"min_severity": 2
}
}
}
Closes anomalyco#17869
KKdev15
force-pushed
the
feat/lsp-min-severity
branch
from
March 17, 2026 01:59
e42fc74 to
7cd1c5c
Compare
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Member
|
This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2. — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #17869
Type of change
What does this PR do?
Adds a
min_severityconfig option per-LSP server to control the minimum diagnostic severity level shown to the AI agent.Currently, only Error (severity 1) diagnostics are displayed. Many LSP servers report style violations and linting issues as Warnings (severity 2), which are filtered out. This prevents the AI from seeing and fixing these issues.
With this change, users can configure each LSP to show warnings (or info/hints) by adding
min_severityto their LSP config:{ "lsp": { "markdownlint": { "command": ["markdownlint-lsp"], "extensions": [".md"], "min_severity": 2 } } }Severity levels: 1=Error (default), 2=Warning, 3=Info, 4=Hint.
Disclaimer: I would like to contribute this feature, as it's something I would really like to have! This MR was created only using AI. I'm not a TypeScript developer, so please be gentle on me :)
How did you verify your code works?
bun typecheck)test/lsp/min-severity.test.tswith 10 tests covering:min_severityper-LSPLSP.Diagnostic.filter()correctly filters by severity levelmin_severityset to 4. Afterwards ask opencode to remove empty lines after headings and show the LSP output with severity. Here's a screenshot of the output, which verifies, that the warning for no empty line around headings (MD022) is actually reported as warning and visible to opencode:("formatter": false)Screenshots / recordings
N/A - no UI changes
Checklist