rust/crates
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
..
ra_arena Use resize_with 2020-03-31 09:02:12 -04:00
ra_assists Do not add default and closure types in 'add explicit type' assist 2020-04-21 22:56:40 +03:00
ra_cfg Update versions 2020-02-18 16:12:40 +02:00
ra_db Some clippy fixes 2020-04-19 15:15:49 -04:00
ra_flycheck insta 0.16 2020-04-14 13:57:02 -04:00
ra_fmt Provide more complete AST accessors to support usage in rustc 2020-04-09 11:50:37 +02:00
ra_hir Do not add default and closure types in 'add explicit type' assist 2020-04-21 22:56:40 +03:00
ra_hir_def Record definitions in extern blocks 2020-04-23 23:36:23 +02:00
ra_hir_expand Improve remove dervie attrs 2020-04-22 01:44:21 +08:00
ra_hir_ty Fully get rid of SyntaxNodePtr::range 2020-04-23 21:23:36 +02:00
ra_ide Merge #3954 2020-04-23 21:48:45 +00:00
ra_ide_db Remove SyntaxPtr::range from more places 2020-04-23 16:33:01 +02:00
ra_mbe Convert bool to ident instead of literal in mbe 2020-04-19 03:24:17 +08:00
ra_parser Align grammar for record patterns and literals 2020-04-12 00:00:15 +02:00
ra_proc_macro proc_macro: add ability to log to stderr and view output in vscode 2020-04-23 01:57:02 +03:00
ra_proc_macro_srv Fix typo 2020-04-20 22:07:47 +03:00
ra_prof Move timeit to stdx 2020-04-10 20:46:42 +02:00
ra_project_model Some clippy fixes 2020-04-19 15:15:49 -04:00
ra_syntax minor 2020-04-23 23:18:18 +02:00
ra_text_edit Remove some TextUnit->usize escapees 2020-03-12 22:33:27 -04:00
ra_tt Improve tt::Subtree debug print 2020-04-10 00:17:32 +08:00
rust-analyzer Merge #3954 2020-04-23 21:48:45 +00:00
stdx Move timeit to stdx 2020-04-10 20:46:42 +02:00
test_utils Make records grammar more orthogonal 2020-04-11 19:20:41 +02:00