rust-analyzer/crates/ide_completion/src/render
bors[bot] 1a82af3527
Merge #7900 #8000
7900: show function params in completion detail r=matklad a=JoshMcguigan

This resolves #7842 by updating the detail for function completions from `-> T` to `fn(T, U) -> V`. I added an expicit unit test for this, `ide_completion::render::fn_detail_includes_args_and_return_type`, which passes.

Lots of other unit tests fail (~60 of them) due to this change, although I believe the failures are purely cosmetic (they were testing the exact format of this output). I'm happy to go update those tests, but before I do that I'd like to make sure this is in fact the format we want for the detail?

edit - I realized `UPDATE_EXPECT=1 cargo test` automatically updates `expect!` tests. Big 👍 to whoever worked on that! So I'll go ahead and update all these tests soon. But I still would like to confirm `fn(T, U) -> V` is the desired content in the `detail` field. 

8000: Use hir formatter for hover text r=matklad a=oxalica

Fix #2765 , (should) fix #4665

Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
Co-authored-by: oxalica <oxalicc@pm.me>
2021-03-16 08:05:24 +00:00
..
builder_ext.rs use references in CompletionItem's builder 2021-03-11 17:46:41 +02:00
const_.rs use references in CompletionItem's builder 2021-03-11 17:46:41 +02:00
enum_variant.rs completions: centralize calculation of relevance and ref matches 2021-03-15 19:40:42 -07:00
function.rs Merge #7900 #8000 2021-03-16 08:05:24 +00:00
macro_.rs Unify naming 2021-03-12 12:22:45 +03:00
pattern.rs unqualfied_path completions aren't responsible for pattern completions 2021-03-15 17:23:08 +01:00
type_alias.rs use references in CompletionItem's builder 2021-03-11 17:46:41 +02:00