aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkjeremy <[email protected]>2020-04-24 15:08:45 +0100
committerkjeremy <[email protected]>2020-04-24 15:08:45 +0100
commitae1f77e5e9aef59aed9cd5a146114e37a74e3316 (patch)
treeae401c434e2a9f533ae396a3e5c0d8761e28c2d2
parentedd6f91cab77c4fabf449a50f4f65e4761c98ca4 (diff)
Add hierarchical symbols client capability
-rw-r--r--crates/rust-analyzer/src/config.rs6
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 {
69pub struct ClientCapsConfig { 69pub 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
74impl Default for Config { 75impl 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 {