mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
This commit is contained in:
commit
11755f3eff
3 changed files with 7 additions and 0 deletions
|
@ -13,6 +13,10 @@ use crate::{
|
|||
};
|
||||
|
||||
pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
|
||||
if ctx.db.feature_flags.get("completion.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),
|
||||
])
|
||||
}
|
||||
|
|
|
@ -116,6 +116,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 a new issue