Move more things into PathCompletionContext

This commit is contained in:
Lukas Wirth 2021-06-07 12:29:46 +02:00
parent e475bcdcc6
commit 4eabcb2c01
8 changed files with 62 additions and 46 deletions

View file

@ -275,8 +275,12 @@ impl<'a> Render<'a> {
};
// Add `<>` for generic types
if self.ctx.completion.is_path_type
&& !self.ctx.completion.has_type_args
if self
.ctx
.completion
.path_context
.as_ref()
.map_or(false, |it| it.is_path_type && !it.has_type_args)
&& self.ctx.completion.config.add_call_parenthesis
{
if let Some(cap) = self.ctx.snippet_cap() {