aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-05-31 08:45:41 +0100
committerAleksey Kladov <[email protected]>2020-05-31 08:45:41 +0100
commitf593393ebb9bfa515caf168a9f037324eeb6edfe (patch)
tree7bb131eb52b9eaf457ac80760000ca5544fc0626 /crates
parentc1161718792a1841841a51bc8450d37c4f1ff535 (diff)
Specify actions
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide/src/goto_definition.rs2
-rw-r--r--crates/ra_ide/src/goto_implementation.rs2
-rw-r--r--crates/ra_ide/src/goto_type_definition.rs8
-rw-r--r--crates/ra_ide/src/runnables.rs11
4 files changed, 20 insertions, 3 deletions
diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs
index 83ea5092c..daeeac76f 100644
--- a/crates/ra_ide/src/goto_definition.rs
+++ b/crates/ra_ide/src/goto_definition.rs
@@ -17,7 +17,7 @@ use crate::{
17 FilePosition, NavigationTarget, RangeInfo, 17 FilePosition, NavigationTarget, RangeInfo,
18}; 18};
19 19
20// Feature: Go To Definition 20// Feature: Go to Definition
21// 21//
22// Navigates to the definition of an identifier. 22// Navigates to the definition of an identifier.
23// 23//
diff --git a/crates/ra_ide/src/goto_implementation.rs b/crates/ra_ide/src/goto_implementation.rs
index a5a296d22..622a094e6 100644
--- a/crates/ra_ide/src/goto_implementation.rs
+++ b/crates/ra_ide/src/goto_implementation.rs
@@ -6,7 +6,7 @@ use ra_syntax::{algo::find_node_at_offset, ast, AstNode};
6 6
7use crate::{display::ToNav, FilePosition, NavigationTarget, RangeInfo}; 7use crate::{display::ToNav, FilePosition, NavigationTarget, RangeInfo};
8 8
9// Feature: Go To Implementation 9// Feature: Go to Implementation
10// 10//
11// Navigates to the impl block of structs, enums or traits. Also implemented as a code lens. 11// Navigates to the impl block of structs, enums or traits. Also implemented as a code lens.
12// 12//
diff --git a/crates/ra_ide/src/goto_type_definition.rs b/crates/ra_ide/src/goto_type_definition.rs
index eeadfa9ee..e74a502ec 100644
--- a/crates/ra_ide/src/goto_type_definition.rs
+++ b/crates/ra_ide/src/goto_type_definition.rs
@@ -5,9 +5,15 @@ use ra_syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, TokenAtOffs
5 5
6use crate::{display::ToNav, FilePosition, NavigationTarget, RangeInfo}; 6use crate::{display::ToNav, FilePosition, NavigationTarget, RangeInfo};
7 7
8// Feature: Go To Type Definition 8// Feature: Go to Type Definition
9// 9//
10// Navigates to the type of an identifier. 10// Navigates to the type of an identifier.
11//
12// |===
13// | Editor | Action Name
14//
15// | VS Code | **Go to Type Definition*
16// |===
11pub(crate) fn goto_type_definition( 17pub(crate) fn goto_type_definition(
12 db: &RootDatabase, 18 db: &RootDatabase,
13 position: FilePosition, 19 position: FilePosition,
diff --git a/crates/ra_ide/src/runnables.rs b/crates/ra_ide/src/runnables.rs
index 6e7e47199..4bf2678e1 100644
--- a/crates/ra_ide/src/runnables.rs
+++ b/crates/ra_ide/src/runnables.rs
@@ -44,6 +44,17 @@ pub enum RunnableKind {
44 Bin, 44 Bin,
45} 45}
46 46
47// Feature: Run
48//
49// Shows a popup suggesting to run a test/benchmark/binary **at the current cursor
50// location**. Super useful for repeatedly running just a single test. Do bind this
51// to a shortcut!
52//
53// |===
54// | Editor | Action Name
55//
56// | VS Code | **Rust Analyzer: Run**
57// |===
47pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> { 58pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> {
48 let sema = Semantics::new(db); 59 let sema = Semantics::new(db);
49 let source_file = sema.parse(file_id); 60 let source_file = sema.parse(file_id);