[clangd] Implement "prepareRename"
Summary:
- "prepareRename" request is added in LSP v3.12.0
- also update the vscode-client dependency to pick-up the rename bug fix[1]
[1]: https://github.com/microsoft/vscode-languageserver-node/issues/447
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D63126
llvm-svn: 366873
diff --git a/clang-tools-extra/clangd/Protocol.cpp b/clang-tools-extra/clangd/Protocol.cpp
index 600896b..0c44928 100644
--- a/clang-tools-extra/clangd/Protocol.cpp
+++ b/clang-tools-extra/clangd/Protocol.cpp
@@ -331,6 +331,10 @@
}
}
}
+ if (auto *Rename = TextDocument->getObject("rename")) {
+ if (auto RenameSupport = Rename->getBoolean("prepareSupport"))
+ R.RenamePrepareSupport = *RenameSupport;
+ }
}
if (auto *Workspace = O->getObject("workspace")) {
if (auto *Symbol = Workspace->getObject("symbol")) {