aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/parsing/lexer/comments.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-02-23 12:17:53 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-02-23 12:17:53 +0000
commite5fb33a94618d45051192d99e859bdd44c3daa36 (patch)
treeb77da2812c973e2270d7abf808634cb9655e2c68 /crates/ra_syntax/src/parsing/lexer/comments.rs
parent38add103c3f30493e336a37827a76f48a6e7c584 (diff)
parent40e6cb196b3e4fdb580812a418edfb8df08cf423 (diff)
Merge #879
879: Fixes to goto definition r=vipentti a=vipentti Previously goto definition would fail when the cursor was over the name of the definition. Now we should properly resolve to a `NavigationTarget` when on top of the name of a definition. In addition this adds `name_range` field to `FileSymbol`, this further fixes goto_definition and symbol based navigation by allowing the `NavigationTarget` to actually have a `focus_range`, meaning instead of focusing on the start of the `full_range`, we can have the cursor focus on the name. e.g. goto definition ```rust fn bar() { fn foo() { } foo<|>(); } ``` Previously this would put the cursor at the start of the FN_DEF: ```rust fn bar() { <|>fn foo() { } foo(); } ``` Now when using the symbol based resolving, we'll have a proper focus range and instead put the cursor at the start of the name. ```rust fn bar() { fn <|>foo() { } foo(); } ``` This fixes #877 but doesn't contain the refactoring of the return type for `goto_definition` Co-authored-by: Ville Penttinen <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/parsing/lexer/comments.rs')
0 files changed, 0 insertions, 0 deletions