Improve autoimports on completion speed

* Ignore modules eaferly
* Do less completion string rendering
This commit is contained in:
Kirill Bulatov 2020-11-24 02:26:16 +02:00
parent 036ea6317c
commit 4baac238a8
4 changed files with 114 additions and 32 deletions

View file

@ -150,6 +150,7 @@ impl<'a> Render<'a> {
import_data: Option<(ModPath, ImportScope, Option<MergeBehaviour>)>,
resolution: &ScopeDef,
) -> Option<CompletionItem> {
let _p = profile::span("render_resolution");
use hir::ModuleDef::*;
let completion_kind = match resolution {