-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Milestone
Description
Hi,
My language server (written on go, transport through stdio) implements the workspace/diagnostic request and returns a full set of diagnostics for all files in the workspace. This works correctly in most cases.
However, when a file is created or deleted (via LSP methods like codeAction/resolve, not a side effect), the editor does not seem to update diagnostics accordingly - it keeps showing outdated diagnostics. Despite my server responding with updated diagnostics for all files, the client seems to ignore them.
Steps
- Implement
workspace/diagnosticwith response likeIF file B.txt NOT exist THEN return one error ELSE return zero errors - Open file
A.txt- it should have one diagnostic error - With
Quick fixchoose some action that should triggercodeAction/resolve - On
codeAction/resolvesend response with
{edit: {
documentChanges: [
{kind: "create", uri: "file:///B.txt"},
{
textDocument: {uri: "file:///B.txt"},
edits: [
{
range: {start: {line: 0, character: 0}, end: {line: 0, character: 0}},
newText: "test"
}
],
},
]
}}workspace/diagnostictriggered and returnedzero errorsforA.txt- File
A.txtstill has visibleone errorinstead ofzero errors - Any edit of
A.txtorB.txtclears errors form fileA.txt
Versions
"vscode-languageclient": "^10.0.0-next.16"
VSCode
Version: 1.101.1
Commit: 18e3a1ec544e6907be1e944a94c496e302073435
Date: 2025-06-18T13:35:12.605Z
Electron: 35.5.1
ElectronBuildId: 11727614
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Linux x64 6.8.0-60-generic snap
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug