diff options
author | Aleksey Kladov <[email protected]> | 2018-12-20 19:13:16 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-20 19:43:06 +0000 |
commit | 23b040962ff299feeef1f967bc2d5ba92b01c2bc (patch) | |
tree | bad7cb6bc8614a8c1ef19b90925dfcb5a8c57284 /crates/ra_lsp_server/src/main_loop/handlers.rs | |
parent | 8d7e8a175e6067e4956a23cfd0c1baf003678734 (diff) |
fold curly blocks
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop/handlers.rs')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 572ae7fb5..801966304 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -446,8 +446,9 @@ pub fn handle_folding_range( | |||
446 | .into_iter() | 446 | .into_iter() |
447 | .map(|fold| { | 447 | .map(|fold| { |
448 | let kind = match fold.kind { | 448 | let kind = match fold.kind { |
449 | FoldKind::Comment => FoldingRangeKind::Comment, | 449 | FoldKind::Comment => Some(FoldingRangeKind::Comment), |
450 | FoldKind::Imports => FoldingRangeKind::Imports, | 450 | FoldKind::Imports => Some(FoldingRangeKind::Imports), |
451 | FoldKind::Block => None, | ||
451 | }; | 452 | }; |
452 | let range = fold.range.conv_with(&line_index); | 453 | let range = fold.range.conv_with(&line_index); |
453 | FoldingRange { | 454 | FoldingRange { |
@@ -455,7 +456,7 @@ pub fn handle_folding_range( | |||
455 | start_character: Some(range.start.character), | 456 | start_character: Some(range.start.character), |
456 | end_line: range.end.line, | 457 | end_line: range.end.line, |
457 | end_character: Some(range.start.character), | 458 | end_character: Some(range.start.character), |
458 | kind: Some(kind), | 459 | kind, |
459 | } | 460 | } |
460 | }) | 461 | }) |
461 | .collect(), | 462 | .collect(), |