rust-analyzer/crates/ra_ide/src/display
bors[bot] e833e03783
Merge #3954
3954: Improve autocompletion by looking on the type and name r=matklad a=bnjjj

This tweet (https://twitter.com/tjholowaychuk/status/1248918374731714560) gaves me the idea to implement that in rust-analyzer.

Basically for this first example I made some examples when we are in a function call definition. I look on the parameter list to prioritize autocompletions for the same types and if it's the same type + the same name then it's displayed first in the completion list.

So here is a draft, first step to open a discussion and know what you think about the implementation. It works (cf tests) but maybe I can make a better implementation at some places. Be careful the code needs some refactoring to be better and concise.

PS: It was lot of fun writing this haha

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-23 21:48:45 +00:00
..
function_signature.rs Improve autocompletion by looking on the type and name 2020-04-21 14:31:57 +02:00
navigation_target.rs Remove SyntaxPtr::range from more places 2020-04-23 16:33:01 +02:00
short_label.rs Start stdx 2020-03-28 11:01:25 +01:00
structure.rs Fix unnecessary braces warnings 2020-04-06 17:21:33 +03:00