forked from qt-creator/qt-creator
LSP: add rename functionality
Fixes: QTCREATORBUG-21578 Change-Id: Iec54ebed6358453af4ef16a2a4e6aef0418faebe Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -415,6 +415,11 @@ void LanguageClientManager::editorOpened(Core::IEditor *editor)
|
||||
if (auto client = clientForDocument(document))
|
||||
client->symbolSupport().findUsages(document, cursor);
|
||||
});
|
||||
connect(widget, &TextEditorWidget::requestRename, this,
|
||||
[document = textEditor->textDocument()](const QTextCursor &cursor) {
|
||||
if (auto client = clientForDocument(document))
|
||||
client->symbolSupport().renameSymbol(document, cursor);
|
||||
});
|
||||
connect(widget, &TextEditorWidget::cursorPositionChanged, this, [this, widget]() {
|
||||
// TODO This would better be a compressing timer
|
||||
QTimer::singleShot(50, this, [widget = QPointer<TextEditorWidget>(widget)]() {
|
||||
|
||||
Reference in New Issue
Block a user