diff options
-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 { |