diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-13 16:17:10 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-13 16:17:10 +0000 |
commit | 65266c644a31e6b321e5afb3c5a2ee75be76cb0c (patch) | |
tree | adde5d96c9f4b0ecd33fd49d8c9fd13004135cab /crates/ra_lsp_server/src/main_loop/handlers.rs | |
parent | 74d03d57e77b791b6973497f17a35136ddc295ab (diff) | |
parent | 3973974de133867c46727ed516b0445d7f1cb63f (diff) |
Merge #813
813: Add support for container_name in workspace/symbol query r=matklad a=vipentti
Currently this does not fill in the container_info if a type is defined on the top level in a file.
e.g. `foo.rs`
```rust
enum Foo { }
```
`Foo` will have None as the container_name, however
```rust
mod foo_mod {
enum Foo { }
}
```
`Foo` has `foo_mod` as the container_name.
This closes #559
Co-authored-by: Ville Penttinen <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop/handlers.rs')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 0cdb39c32..09d896c40 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -190,7 +190,7 @@ pub fn handle_workspace_symbol( | |||
190 | name: nav.name().to_string(), | 190 | name: nav.name().to_string(), |
191 | kind: nav.kind().conv(), | 191 | kind: nav.kind().conv(), |
192 | location: nav.try_conv_with(world)?, | 192 | location: nav.try_conv_with(world)?, |
193 | container_name: None, | 193 | container_name: nav.container_name().map(|v| v.to_string()), |
194 | deprecated: None, | 194 | deprecated: None, |
195 | }; | 195 | }; |
196 | res.push(info); | 196 | res.push(info); |