mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Move completion label functions to display
This commit is contained in:
parent
dfaebd76ab
commit
946b5789d1
4 changed files with 32 additions and 31 deletions
|
@ -6,6 +6,9 @@ use ra_syntax::ast::NameOwner;
|
|||
|
||||
use crate::completion::{
|
||||
Completions, CompletionKind, CompletionItemKind, CompletionContext, CompletionItem,
|
||||
};
|
||||
|
||||
use crate::display::{
|
||||
function_label, const_label, type_label,
|
||||
};
|
||||
|
||||
|
@ -101,7 +104,7 @@ impl Completions {
|
|||
CompletionItemKind::Function
|
||||
})
|
||||
.set_documentation(func.docs(ctx.db))
|
||||
.set_detail(detail);
|
||||
.detail(detail);
|
||||
// If not an import, add parenthesis automatically.
|
||||
if ctx.use_item_syntax.is_none() && !ctx.is_call {
|
||||
tested_by!(inserts_parens_for_function_calls);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue