microsoft / microsoft/vscode-languageserver-node
Аfter file create/delete - request workspace/diagnostic with updated diagnostics are ignored by client
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 404
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 14
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the sequence using workspace/diagnostic and codeAction/resolve with the supplied VS Code and vscode-languageclient versions. Trace how the client handles workspace diagnostics after documentChanges create or delete files; done means A.txt refreshes without editing A.txt or B.txt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100