mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Normalize spelling to American English
This commit is contained in:
parent
1341a98f05
commit
17f236c2b0
10 changed files with 44 additions and 43 deletions
|
@ -45,7 +45,7 @@ pub(crate) fn complete_unqualified_path(acc: &mut Completions, ctx: &CompletionC
|
|||
});
|
||||
|
||||
if ctx.config.enable_autoimport_completions && ctx.config.resolve_additional_edits_lazily() {
|
||||
fuzzy_completion(acc, ctx).unwrap_or_default()
|
||||
fuzzy_completion(acc, ctx);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,10 +100,10 @@ fn complete_enum_variants(acc: &mut Completions, ctx: &CompletionContext, ty: &T
|
|||
// To avoid an excessive amount of the results returned, completion input is checked for inclusion in the identifiers only
|
||||
// (i.e. in `HashMap` in the `std::collections::HashMap` path), also not in the module indentifiers.
|
||||
//
|
||||
// .Merge Behaviour
|
||||
// .Merge Behavior
|
||||
//
|
||||
// It is possible to configure how use-trees are merged with the `importMergeBehaviour` setting.
|
||||
// Mimics the corresponding behaviour of the `Auto Import` feature.
|
||||
// It is possible to configure how use-trees are merged with the `importMergeBehavior` setting.
|
||||
// Mimics the corresponding behavior of the `Auto Import` feature.
|
||||
//
|
||||
// .LSP and performance implications
|
||||
//
|
||||
|
@ -150,7 +150,7 @@ fn fuzzy_completion(acc: &mut Completions, ctx: &CompletionContext) -> Option<()
|
|||
ImportEdit {
|
||||
import_path: import_path.clone(),
|
||||
import_scope: import_scope.clone(),
|
||||
merge_behaviour: ctx.config.merge,
|
||||
merge_behavior: ctx.config.merge,
|
||||
},
|
||||
&definition,
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//! module, and we use to statically check that we only produce snippet
|
||||
//! completions if we are allowed to.
|
||||
|
||||
use ide_db::helpers::insert_use::MergeBehaviour;
|
||||
use ide_db::helpers::insert_use::MergeBehavior;
|
||||
use rustc_hash::FxHashSet;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
|
@ -14,7 +14,7 @@ pub struct CompletionConfig {
|
|||
pub add_call_parenthesis: bool,
|
||||
pub add_call_argument_snippets: bool,
|
||||
pub snippet_cap: Option<SnippetCap>,
|
||||
pub merge: Option<MergeBehaviour>,
|
||||
pub merge: Option<MergeBehavior>,
|
||||
/// A set of capabilities, enabled on the client and supported on the server.
|
||||
pub active_resolve_capabilities: FxHashSet<CompletionResolveCapability>,
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ impl Default for CompletionConfig {
|
|||
add_call_parenthesis: true,
|
||||
add_call_argument_snippets: true,
|
||||
snippet_cap: Some(SnippetCap { _private: () }),
|
||||
merge: Some(MergeBehaviour::Full),
|
||||
merge: Some(MergeBehavior::Full),
|
||||
active_resolve_capabilities: FxHashSet::default(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::fmt;
|
|||
|
||||
use hir::{Documentation, ModPath, Mutability};
|
||||
use ide_db::helpers::{
|
||||
insert_use::{self, ImportScope, MergeBehaviour},
|
||||
insert_use::{self, ImportScope, MergeBehavior},
|
||||
mod_path_to_ast,
|
||||
};
|
||||
use syntax::{algo, TextRange};
|
||||
|
@ -271,7 +271,7 @@ impl CompletionItem {
|
|||
pub struct ImportEdit {
|
||||
pub import_path: ModPath,
|
||||
pub import_scope: ImportScope,
|
||||
pub merge_behaviour: Option<MergeBehaviour>,
|
||||
pub merge_behavior: Option<MergeBehavior>,
|
||||
}
|
||||
|
||||
impl ImportEdit {
|
||||
|
@ -283,7 +283,7 @@ impl ImportEdit {
|
|||
let rewriter = insert_use::insert_use(
|
||||
&self.import_scope,
|
||||
mod_path_to_ast(&self.import_path),
|
||||
self.merge_behaviour,
|
||||
self.merge_behavior,
|
||||
);
|
||||
let old_ast = rewriter.rewrite_root()?;
|
||||
let mut import_insert = TextEdit::builder();
|
||||
|
|
|
@ -153,7 +153,7 @@ pub fn resolve_completion_edits(
|
|||
})
|
||||
.find(|mod_path| mod_path.to_string() == full_import_path)?;
|
||||
|
||||
ImportEdit { import_path, import_scope, merge_behaviour: config.merge }
|
||||
ImportEdit { import_path, import_scope, merge_behavior: config.merge }
|
||||
.to_text_edit()
|
||||
.map(|edit| vec![edit])
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue