Skip to content

Commit

Permalink
Removes local variables from outline rust-lang#594
Browse files Browse the repository at this point in the history
  • Loading branch information
aldonogueira committed Feb 25, 2018
1 parent 8e781f7 commit fb073a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/actions/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use span;

use actions::work_pool;
use actions::work_pool::WorkDescription;
use analysis::DefKind;
use lsp_data;
use lsp_data::*;
use server;
Expand Down Expand Up @@ -116,6 +117,7 @@ impl RequestAction for Symbols {
Ok(
symbols
.into_iter()
.filter(|s| s.kind != DefKind::Local) // Removes local variables from the outline
.map(|s| {
SymbolInformation {
name: s.name,
Expand Down

0 comments on commit fb073a5

Please sign in to comment.