[gnome-builder] rust: add support for renaming symbols
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] rust: add support for renaming symbols
- Date: Wed, 26 Oct 2016 06:05:24 +0000 (UTC)
commit d9e16d87d89a0f36970dd6ebfb3cfe8d095438b3
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 25 23:04:35 2016 -0700
rust: add support for renaming symbols
This allows you to rename a symbol with ctrl+shift+r when the cursor is
on a symbol in the editor.
plugins/rust-langserv/rust-langserv.plugin | 2 +-
plugins/rust-langserv/rust_langserv_plugin.py | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/plugins/rust-langserv/rust-langserv.plugin b/plugins/rust-langserv/rust-langserv.plugin
index f339cdd..141403b 100644
--- a/plugins/rust-langserv/rust-langserv.plugin
+++ b/plugins/rust-langserv/rust-langserv.plugin
@@ -9,5 +9,5 @@ Builtin=true
X-Completion-Provider-Languages=rust
X-Diagnostic-Provider-Languages=rust
X-Highlighter-Languages=rust
+X-Rename-Provider-Languages=rust
X-Symbol-Resolver-Languages=rust
-
diff --git a/plugins/rust-langserv/rust_langserv_plugin.py b/plugins/rust-langserv/rust_langserv_plugin.py
index 63da4e1..d083773 100644
--- a/plugins/rust-langserv/rust_langserv_plugin.py
+++ b/plugins/rust-langserv/rust_langserv_plugin.py
@@ -149,11 +149,17 @@ class RustCompletionProvider(Ide.LangservCompletionProvider):
super().__init__(*args, **kwargs)
self.connect('notify::context', lambda *_: RustService.bind_client(self))
+class RustRenameProvider(Ide.LangservRenameProvider):
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+ self.connect('notify::context', lambda *_: RustService.bind_client(self))
+
class RustSymbolResolver(Ide.LangservSymbolResolver):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.connect('notify::context', lambda *_: RustService.bind_client(self))
+
"""
class RustHighlighter(Ide.LangservHighlighter):
def __init__(self, *args, **kwargs):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]