mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
Implement postfix completions feature flag
This commit is contained in:
parent
602f11f27b
commit
eb72156094
@ -13,6 +13,10 @@ use crate::{
|
||||
};
|
||||
|
||||
pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
|
||||
if ctx.db.feature_flags.get("completions.enable-postfix") == false {
|
||||
return;
|
||||
}
|
||||
|
||||
let dot_receiver = match &ctx.dot_receiver {
|
||||
Some(it) => it,
|
||||
None => return,
|
||||
|
@ -54,6 +54,7 @@ impl Default for FeatureFlags {
|
||||
FeatureFlags::new(&[
|
||||
("lsp.diagnostics", true),
|
||||
("completion.insertion.add-call-parenthesis", true),
|
||||
("completion.enable-postfix", true),
|
||||
("notifications.workspace-loaded", true),
|
||||
])
|
||||
}
|
||||
|
@ -107,6 +107,8 @@ host.
|
||||
"lsp.diagnostics": true,
|
||||
// Automatically insert `()` and `<>` when completing functions and types.
|
||||
"completion.insertion.add-call-parenthesis": true,
|
||||
// Enable completions like `.if`, `.match`, etc.
|
||||
"completion.enable-postfix": true,
|
||||
// Show notification when workspace is fully loaded
|
||||
"notifications.workspace-loaded": true,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user