From fea143c5cbe63682bd15e1caf74a7bd6591dc22c Mon Sep 17 00:00:00 2001 From: Felix Zeller Date: Mon, 22 Apr 2024 16:00:30 -0400 Subject: [PATCH] change unindexed block completion previews --- src/completion/unindexed_block_completer.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/completion/unindexed_block_completer.rs b/src/completion/unindexed_block_completer.rs index 58a8c63e..dd606f24 100644 --- a/src/completion/unindexed_block_completer.rs +++ b/src/completion/unindexed_block_completer.rs @@ -151,8 +151,8 @@ impl<'a> UnindexedBlock<'a> { .link_completer .vault() .select_referenceable_nodes(Some(block.file)) - .into_iter() - .find(|referenceable| match referenceable { + .into_par_iter() + .find_any(|referenceable| match referenceable { Referenceable::IndexedBlock(_path, indexed_block) => { indexed_block.range.start.line == block.range.start.line } @@ -172,8 +172,8 @@ impl<'a> UnindexedBlock<'a> { _ => ( Some(Documentation::MarkupContent(MarkupContent { kind: MarkupKind::Markdown, - value: (block.range.start.line as isize - 5 - ..=block.range.start.line as isize + 5) + value: (block.range.start.line as isize - 1 + ..=block.range.start.line as isize + 1) .flat_map(|i| { Some(( completer