markdown-oxide
markdown-oxide copied to clipboard
Feature request: use `wokrspace/didRenameFiles` for renaming references
Problem
When you rename file, the LS client (neovim, VS Code) sends a workspace/didRenameFiles event, e.g.
[DEBUG][2025-08-19 10:44:53] .../vim/lsp/rpc.lua:277 "rpc.send" { jsonrpc = "2.0", method = "workspace/didRenameFiles", params = { files = { { newUri = "file:///Users/tomas/workspace/private/notes/tmp/ABC.md", oldUri = "file:///Users/tomas/workspace/private/notes/tmp/B.md" } } } }
Specs: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_didRename
If we respect this notification and use it for renaming all references (the same way we already do for textDocument/rename request (spec)) we could make the rename work in all clients that support workspace/didRenameFiles.
Solution
handle workspace/didRenameFiles notification the same way we do handle textDocument/rename request