Don't complete visibility accessors after existing ones

This commit is contained in:
Lukas Wirth 2021-06-16 17:45:58 +02:00
parent d338a80394
commit 1a8f76a224
4 changed files with 24 additions and 3 deletions

View file

@ -302,6 +302,10 @@ impl<'a> CompletionContext<'a> {
)
}
pub(crate) fn has_visibility_prev_sibling(&self) -> bool {
matches!(self.prev_sibling, Some(ImmediatePrevSibling::Visibility))
}
pub(crate) fn after_if(&self) -> bool {
matches!(self.prev_sibling, Some(ImmediatePrevSibling::IfExpr))
}