From adc4c6b9d7fd91827c4cf383a1e95dc7e27138e0 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 12 Sep 2020 11:55:01 +0200 Subject: Make MergeBehaviour configurable --- crates/assists/src/handlers/replace_qualified_name_with_use.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/assists/src/handlers/replace_qualified_name_with_use.rs') diff --git a/crates/assists/src/handlers/replace_qualified_name_with_use.rs b/crates/assists/src/handlers/replace_qualified_name_with_use.rs index 85c70d16b..e48407fcc 100644 --- a/crates/assists/src/handlers/replace_qualified_name_with_use.rs +++ b/crates/assists/src/handlers/replace_qualified_name_with_use.rs @@ -2,7 +2,7 @@ use syntax::{algo::SyntaxRewriter, ast, match_ast, AstNode, SyntaxNode, TextRang use test_utils::mark; use crate::{ - utils::{insert_use, ImportScope, MergeBehaviour}, + utils::{insert_use, ImportScope}, AssistContext, AssistId, AssistKind, Assists, }; use ast::make; @@ -60,7 +60,7 @@ pub(crate) fn replace_qualified_name_with_use( let new_syntax = insert_use( import_scope, make::path_from_text(path_to_import), - Some(MergeBehaviour::Full), + ctx.config.insert_use.merge, ); builder.replace(syntax.text_range(), new_syntax.to_string()) } -- cgit v1.2.3