diff options
author | kjeremy <[email protected]> | 2020-04-24 15:08:45 +0100 |
---|---|---|
committer | kjeremy <[email protected]> | 2020-04-24 15:08:45 +0100 |
commit | ae1f77e5e9aef59aed9cd5a146114e37a74e3316 (patch) | |
tree | ae401c434e2a9f533ae396a3e5c0d8761e28c2d2 /crates | |
parent | edd6f91cab77c4fabf449a50f4f65e4761c98ca4 (diff) |
Add hierarchical symbols client capability
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 715eddadb..74a63e32a 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs | |||
@@ -69,6 +69,7 @@ pub enum RustfmtConfig { | |||
69 | pub struct ClientCapsConfig { | 69 | pub struct ClientCapsConfig { |
70 | pub location_link: bool, | 70 | pub location_link: bool, |
71 | pub line_folding_only: bool, | 71 | pub line_folding_only: bool, |
72 | pub hierarchical_symbols: bool, | ||
72 | } | 73 | } |
73 | 74 | ||
74 | impl Default for Config { | 75 | impl Default for Config { |
@@ -215,6 +216,11 @@ impl Config { | |||
215 | if let Some(value) = caps.folding_range.as_ref().and_then(|it| it.line_folding_only) { | 216 | if let Some(value) = caps.folding_range.as_ref().and_then(|it| it.line_folding_only) { |
216 | self.client_caps.line_folding_only = value | 217 | self.client_caps.line_folding_only = value |
217 | } | 218 | } |
219 | if let Some(value) = | ||
220 | caps.document_symbol.as_ref().and_then(|it| it.hierarchical_document_symbol_support) | ||
221 | { | ||
222 | self.client_caps.hierarchical_symbols = value | ||
223 | } | ||
218 | self.completion.allow_snippets(false); | 224 | self.completion.allow_snippets(false); |
219 | if let Some(completion) = &caps.completion { | 225 | if let Some(completion) = &caps.completion { |
220 | if let Some(completion_item) = &completion.completion_item { | 226 | if let Some(completion_item) = &completion.completion_item { |