microsoft / microsoft/vscode-languageserver-node
`textDocument/didClose` and `textDocument/didOpen` not fired on file rename changing case
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 404
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 14
Description
The specification states that
Document renames should be signaled to a server sending a document close notification with the document’s old name followed by an open notification using the document’s new name
When a file is renamed to the same content but a change of case (e.g. foo.txt -> Foo.txt), these events do not get fired.
This causes a loss of synchronisation between the client and the server
Steps:
- Create a dummy language server (e.g. from https://github.com/microsoft/vscode-extension-samples/tree/main/lsp-sample)
- Enable trace logging (either messages or verbose)
- Create a new file
foo.txtand open it: observe atextDocument/didOpenrequest - Rename the file to
Foo.txt.
Expected: a didClose and then a didOpen request.
Actual: nothing
Client + Server version: 8.0.2
On Windows
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
Reproduce the case-only rename on Windows using the lsp-sample language server with verbose trace logging, checking the textDocument/didOpen and textDocument/didClose notifications. Trace the rename handling in this repository and ensure the expected close-then-open sequence is emitted for a case change, then verify the trace shows both events.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100