From a9c3e70443e1075917662c7b038be4338feb6938 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 13 Mar 2021 19:24:28 +0300 Subject: [PATCH] fix folding range kind --- crates/rust-analyzer/src/to_proto.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 9ca0915b99..5736875d38 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -484,7 +484,8 @@ pub(crate) fn folding_range( let kind = match fold.kind { FoldKind::Comment => Some(lsp_types::FoldingRangeKind::Comment), FoldKind::Imports => Some(lsp_types::FoldingRangeKind::Imports), - FoldKind::Mods | FoldKind::Block | FoldKind::ArgList | FoldKind::Region => None, + FoldKind::Region => Some(lsp_types::FoldingRangeKind::Region), + FoldKind::Mods | FoldKind::Block | FoldKind::ArgList => None, }; let range = range(line_index, fold.range);