diff --git a/src/plugins/clangcodemodel/clangdclient.cpp b/src/plugins/clangcodemodel/clangdclient.cpp index 392a6a1ffe8..9fa2e792ab6 100644 --- a/src/plugins/clangcodemodel/clangdclient.cpp +++ b/src/plugins/clangcodemodel/clangdclient.cpp @@ -370,8 +370,6 @@ ClangdClient::ClangdClient(Project *project, const Utils::FilePath &jsonDbDir, c setActivateDocumentAutomatically(true); setCompletionAssistProvider(new ClangdCompletionAssistProvider(this)); setQuickFixAssistProvider(new ClangdQuickFixProvider(this)); - symbolSupport().setDefaultRenamingSymbolMapper( - [](const QString &oldSymbol) { return oldSymbol + "_new"; }); symbolSupport().setLimitRenamingToProjects(true); if (!project) { QJsonObject initOptions; diff --git a/src/plugins/languageclient/languageclientsymbolsupport.cpp b/src/plugins/languageclient/languageclientsymbolsupport.cpp index 995ca770f3d..b5f301d4433 100644 --- a/src/plugins/languageclient/languageclientsymbolsupport.cpp +++ b/src/plugins/languageclient/languageclientsymbolsupport.cpp @@ -549,8 +549,11 @@ void SymbolSupport::handleRenameResponse(Core::SearchResult *search, const std::optional &error = response.error(); QString errorMessage; if (error.has_value()) { - m_client->log(*error); errorMessage = error->toString(); + if (errorMessage.contains("Cannot rename symbol: new name is the same as the old name")) + errorMessage = Tr::tr("Start typing to see replacements"); // clangd optimization + else + m_client->log(*error); } const std::optional &edits = response.result();