mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Align config's API with usage
The config now is mostly immutable, optimize for that.
This commit is contained in:
parent
7ae4b8bdb6
commit
f8a0561178
22 changed files with 164 additions and 162 deletions
|
@ -113,7 +113,7 @@ mod tests {
|
|||
use test_utils::mark;
|
||||
|
||||
use crate::{
|
||||
test_utils::{check_edit, check_edit_with_config},
|
||||
test_utils::{check_edit, check_edit_with_config, TEST_CONFIG},
|
||||
CompletionConfig,
|
||||
};
|
||||
|
||||
|
@ -211,7 +211,7 @@ fn main() { S::foo(${1:&self})$0 }
|
|||
fn suppress_arg_snippets() {
|
||||
mark::check!(suppress_arg_snippets);
|
||||
check_edit_with_config(
|
||||
CompletionConfig { add_call_argument_snippets: false, ..CompletionConfig::default() },
|
||||
CompletionConfig { add_call_argument_snippets: false, ..TEST_CONFIG },
|
||||
"with_args",
|
||||
r#"
|
||||
fn with_args(x: i32, y: String) {}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
//! Renderer for patterns.
|
||||
|
||||
use hir::{db::HirDatabase, HasAttrs, HasVisibility, Name, StructKind};
|
||||
use ide_db::helpers::SnippetCap;
|
||||
use itertools::Itertools;
|
||||
|
||||
use crate::{
|
||||
config::SnippetCap, item::CompletionKind, render::RenderContext, CompletionItem,
|
||||
CompletionItemKind,
|
||||
};
|
||||
use crate::{item::CompletionKind, render::RenderContext, CompletionItem, CompletionItemKind};
|
||||
|
||||
fn visible_fields(
|
||||
ctx: &RenderContext<'_>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue