diff options
author | Jeremy A. Kolb <[email protected]> | 2018-10-09 15:08:17 +0100 |
---|---|---|
committer | Jeremy A. Kolb <[email protected]> | 2018-10-11 21:40:46 +0100 |
commit | f8a2b533045757c42c206b2596448baf4737f1f0 (patch) | |
tree | 587e681ec5323d8deabcc6d533de033e7aa79be7 /crates/ra_syntax | |
parent | 2ba6f18586d02a6dbc32e0bea88f7b4236277ea1 (diff) |
Language Server: textDocument/signatureHelp
Implements a pretty barebones function signature help mechanism in
the language server.
Users can use `Analysis::resolve_callback()` to get basic information
about a call site.
Fixes #102
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 5 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar.ron | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index ef7b5b1a1..1901a667c 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -1387,7 +1387,10 @@ impl<'a> AstNode<'a> for PathExpr<'a> { | |||
1387 | fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax } | 1387 | fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax } |
1388 | } | 1388 | } |
1389 | 1389 | ||
1390 | impl<'a> PathExpr<'a> {} | 1390 | impl<'a> PathExpr<'a> {pub fn path(self) -> Option<Path<'a>> { |
1391 | super::child_opt(self) | ||
1392 | } | ||
1393 | } | ||
1391 | 1394 | ||
1392 | // PathPat | 1395 | // PathPat |
1393 | #[derive(Debug, Clone, Copy)] | 1396 | #[derive(Debug, Clone, Copy)] |
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index 9da0c2c13..a904f7505 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron | |||
@@ -342,7 +342,7 @@ Grammar( | |||
342 | "TupleExpr": (), | 342 | "TupleExpr": (), |
343 | "ArrayExpr": (), | 343 | "ArrayExpr": (), |
344 | "ParenExpr": (), | 344 | "ParenExpr": (), |
345 | "PathExpr": (), | 345 | "PathExpr": (options: ["Path"]), |
346 | "LambdaExpr": ( | 346 | "LambdaExpr": ( |
347 | options: [ | 347 | options: [ |
348 | "ParamList", | 348 | "ParamList", |