aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorJamie Cunliffe <[email protected]>2021-05-30 14:52:19 +0100
committerJamie Cunliffe <[email protected]>2021-06-21 17:47:00 +0100
commit284483b347d15bee3a7bf293d33e5f19a9740102 (patch)
treee582a7ecdef30511b8982529f11889f1aab3ca5e /crates/ide/src
parent1b05dbba39d5a4d46f321dc962df99038cddbf21 (diff)
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.
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs
index 3798f32cc..0693869a2 100644
--- a/crates/ide/src/lib.rs
+++ b/crates/ide/src/lib.rs
@@ -220,6 +220,7 @@ impl Analysis {
220 cfg_options, 220 cfg_options,
221 Env::default(), 221 Env::default(),
222 Default::default(), 222 Default::default(),
223 Default::default(),
223 ); 224 );
224 change.change_file(file_id, Some(Arc::new(text))); 225 change.change_file(file_id, Some(Arc::new(text)));
225 change.set_crate_graph(crate_graph); 226 change.set_crate_graph(crate_graph);