]> git.lizzy.rs Git - rust.git/commit
Improve completion of cfg attributes
authorJamie Cunliffe <Jamie.Cunliffe@outlook.com>
Sun, 30 May 2021 13:52:19 +0000 (14:52 +0100)
committerJamie Cunliffe <Jamie.Cunliffe@outlook.com>
Mon, 21 Jun 2021 16:47:00 +0000 (17:47 +0100)
commit284483b347d15bee3a7bf293d33e5f19a9740102
treee582a7ecdef30511b8982529f11889f1aab3ca5e
parent1b05dbba39d5a4d46f321dc962df99038cddbf21
Improve completion of cfg attributes

The completion of cfg will look at the enabled cfg keys when
performing completion.

It will also look crate features when completing a feature cfg
option. A fixed list of known values for some cfg options are
provided.

For unknown keys it will look at the enabled values for that cfg key,
which means that completion will only show enabled options for those.
crates/base_db/src/fixture.rs
crates/base_db/src/input.rs
crates/cfg/src/lib.rs
crates/hir/src/lib.rs
crates/ide/src/lib.rs
crates/ide_completion/src/completions/attribute.rs
crates/ide_completion/src/completions/attribute/cfg.rs [new file with mode: 0644]
crates/project_model/src/workspace.rs