diff options
author | Aleksey Kladov <[email protected]> | 2018-09-03 19:03:37 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-09-03 19:03:37 +0100 |
commit | 47cbaeba6f21e59ee8735bfe8bcbf06300767b57 (patch) | |
tree | 779f75f740a1717ab225a52f26f53562c28ace4d /crates/server/src/main_loop/handlers.rs | |
parent | b04c14d4ad51433b0055e2e5799f98da20d15d58 (diff) |
Index deps
Diffstat (limited to 'crates/server/src/main_loop/handlers.rs')
-rw-r--r-- | crates/server/src/main_loop/handlers.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/server/src/main_loop/handlers.rs b/crates/server/src/main_loop/handlers.rs index 898195f6d..323d4e95e 100644 --- a/crates/server/src/main_loop/handlers.rs +++ b/crates/server/src/main_loop/handlers.rs | |||
@@ -141,14 +141,18 @@ pub fn handle_workspace_symbol( | |||
141 | token: JobToken, | 141 | token: JobToken, |
142 | ) -> Result<Option<Vec<SymbolInformation>>> { | 142 | ) -> Result<Option<Vec<SymbolInformation>>> { |
143 | let all_symbols = params.query.contains("#"); | 143 | let all_symbols = params.query.contains("#"); |
144 | let libs = params.query.contains("*"); | ||
144 | let query = { | 145 | let query = { |
145 | let query: String = params.query.chars() | 146 | let query: String = params.query.chars() |
146 | .filter(|&c| c != '#') | 147 | .filter(|&c| c != '#' && c != '*') |
147 | .collect(); | 148 | .collect(); |
148 | let mut q = Query::new(query); | 149 | let mut q = Query::new(query); |
149 | if !all_symbols { | 150 | if !all_symbols { |
150 | q.only_types(); | 151 | q.only_types(); |
151 | } | 152 | } |
153 | if libs { | ||
154 | q.libs(); | ||
155 | } | ||
152 | q.limit(128); | 156 | q.limit(128); |
153 | q | 157 | q |
154 | }; | 158 | }; |