We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b74e96f commit 7f1fac7Copy full SHA for 7f1fac7
crates/ide-completion/src/completions/attribute/cfg.rs
@@ -3,6 +3,7 @@
3
use std::iter;
4
5
use ide_db::SymbolKind;
6
+use itertools::Itertools;
7
use syntax::SyntaxKind;
8
9
use crate::{completions::Completions, context::CompletionContext, CompletionItem};
@@ -34,7 +35,7 @@ pub(crate) fn complete_cfg(acc: &mut Completions, ctx: &CompletionContext) {
34
35
36
acc.add(item.build());
37
}),
- None => ctx.krate.potential_cfg(ctx.db).get_cfg_keys().cloned().for_each(|s| {
38
+ None => ctx.krate.potential_cfg(ctx.db).get_cfg_keys().cloned().unique().for_each(|s| {
39
let item = CompletionItem::new(SymbolKind::BuiltinAttr, ctx.source_range(), s);
40
41
0 commit comments