aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/render.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-01-22 15:59:22 +0000
committerAleksey Kladov <[email protected]>2021-01-22 16:15:34 +0000
commita40f78f92ad2050d6178dfd70374701c6bc826ae (patch)
treebd1b08a23eeaecea0b2413454cca2ca0c6631bfe /crates/completion/src/render.rs
parent02a17cdffcfdea49981b4642be3027e564d28d9b (diff)
More useful fn detail in completion
Detail should be rendered as shtort one line, just dumping fn header there is not useful, despite the fact that TS does this. The fact that this is a function should be indicated by the icon, the same goes for pub/const/async etc qualitfiers name is already present in the lable (and arg list should be a part of that, as in idea) But the return type is the small genuinerlly useful bit of info we can show here
Diffstat (limited to 'crates/completion/src/render.rs')
-rw-r--r--crates/completion/src/render.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/completion/src/render.rs b/crates/completion/src/render.rs
index fa594b5e5..6eb20df2b 100644
--- a/crates/completion/src/render.rs
+++ b/crates/completion/src/render.rs
@@ -523,7 +523,7 @@ fn main() { let _: m::Spam = S$0 }
523 Function, 523 Function,
524 ), 524 ),
525 lookup: "main", 525 lookup: "main",
526 detail: "fn main()", 526 detail: "-> ()",
527 }, 527 },
528 ] 528 ]
529 "#]], 529 "#]],
@@ -552,7 +552,7 @@ fn main() { som$0 }
552 Function, 552 Function,
553 ), 553 ),
554 lookup: "main", 554 lookup: "main",
555 detail: "fn main()", 555 detail: "-> ()",
556 }, 556 },
557 CompletionItem { 557 CompletionItem {
558 label: "something_deprecated()", 558 label: "something_deprecated()",
@@ -563,7 +563,7 @@ fn main() { som$0 }
563 Function, 563 Function,
564 ), 564 ),
565 lookup: "something_deprecated", 565 lookup: "something_deprecated",
566 detail: "fn something_deprecated()", 566 detail: "-> ()",
567 deprecated: true, 567 deprecated: true,
568 }, 568 },
569 CompletionItem { 569 CompletionItem {
@@ -575,7 +575,7 @@ fn main() { som$0 }
575 Function, 575 Function,
576 ), 576 ),
577 lookup: "something_else_deprecated", 577 lookup: "something_else_deprecated",
578 detail: "fn something_else_deprecated()", 578 detail: "-> ()",
579 deprecated: true, 579 deprecated: true,
580 }, 580 },
581 ] 581 ]
@@ -626,7 +626,7 @@ impl S {
626 insert: "bar()$0", 626 insert: "bar()$0",
627 kind: Method, 627 kind: Method,
628 lookup: "bar", 628 lookup: "bar",
629 detail: "fn bar(self)", 629 detail: "-> ()",
630 documentation: Documentation( 630 documentation: Documentation(
631 "Method docs", 631 "Method docs",
632 ), 632 ),
@@ -726,7 +726,7 @@ fn foo(s: S) { s.$0 }
726 insert: "the_method()$0", 726 insert: "the_method()$0",
727 kind: Method, 727 kind: Method,
728 lookup: "the_method", 728 lookup: "the_method",
729 detail: "fn the_method(&self)", 729 detail: "-> ()",
730 }, 730 },
731 ] 731 ]
732 "#]], 732 "#]],