From ae1f77e5e9aef59aed9cd5a146114e37a74e3316 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Fri, 24 Apr 2020 10:08:45 -0400 Subject: Add hierarchical symbols client capability --- crates/rust-analyzer/src/config.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates') 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 { pub struct ClientCapsConfig { pub location_link: bool, pub line_folding_only: bool, + pub hierarchical_symbols: bool, } impl Default for Config { @@ -215,6 +216,11 @@ impl Config { if let Some(value) = caps.folding_range.as_ref().and_then(|it| it.line_folding_only) { self.client_caps.line_folding_only = value } + if let Some(value) = + caps.document_symbol.as_ref().and_then(|it| it.hierarchical_document_symbol_support) + { + self.client_caps.hierarchical_symbols = value + } self.completion.allow_snippets(false); if let Some(completion) = &caps.completion { if let Some(completion_item) = &completion.completion_item { -- cgit v1.2.3