Skip to content

Require workspace refresh support before enabling pull diagnostics - #391

Closed
lcroberts wants to merge 1 commit into
PHPantom-dev:mainfrom
lcroberts:bug/pull-diagnostics
Closed

Require workspace refresh support before enabling pull diagnostics#391
lcroberts wants to merge 1 commit into
PHPantom-dev:mainfrom
lcroberts:bug/pull-diagnostics

Conversation

@lcroberts

Copy link
Copy Markdown

Only negotiate and enable pull diagnostics (textDocument/diagnostic) when the client explicitly advertises workspace.diagnostic.refreshSupport. Clients that advertise pull diagnostics without refresh support (e.g. Neovim ≤ 0.11)
now fall back to standard push diagnostics (textDocument/publishDiagnostics).

I originally noticed this issue when using the LSP with a slightly older version of neovim. I would occasionally have stale diagnostics that stuck around until I edited the line.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, examples/)
  • I have updated the config schema (config-schema.json)
  • I have added/updated tests to cover my changes
  • I fully understand the code that I am submitting (what it does,
    how it works, how it's organized), including any code drafted by an LLM.
  • For any prose generated by an LLM, I have proof-read and copy-edited with
    an eye towards deleting anything that is irrelevant, clarifying anything
    that is confusing, and adding details that are relevant. This includes,
    for example, commit descriptions, PR descriptions, and code comments.

@calebdw

calebdw commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

This is not the correct solution, neovim had a bug in its implementation and that doesn't mean that we need to support such a case

@lcroberts lcroberts closed this Aug 27, 2026
@lcroberts
lcroberts deleted the bug/pull-diagnostics branch August 27, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants