rust/crates/rust-analyzer
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
..
src Merge #3954 2020-04-23 21:48:45 +00:00
tests/heavy_tests Cleanup proc_macro config 2020-04-23 18:55:26 +02:00
build.rs Remove unused placeholder 2020-02-21 18:33:45 +08:00
Cargo.toml Add proc-macro cli command for rust-analyzer 2020-04-16 21:13:57 +08:00