From ed1f2b58f7360e96c3b23e6759678b0a185d5ce5 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 13 Feb 2021 19:58:58 +0100 Subject: Group generate getter/setter assist --- crates/assists/src/handlers/generate_setter.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/assists/src/handlers/generate_setter.rs') diff --git a/crates/assists/src/handlers/generate_setter.rs b/crates/assists/src/handlers/generate_setter.rs index b655f9b9c..288cf745d 100644 --- a/crates/assists/src/handlers/generate_setter.rs +++ b/crates/assists/src/handlers/generate_setter.rs @@ -1,10 +1,9 @@ use stdx::{format_to, to_lower_snake_case}; -use syntax::ast::VisibilityOwner; -use syntax::ast::{self, AstNode, NameOwner}; +use syntax::ast::{self, AstNode, NameOwner, VisibilityOwner}; use crate::{ utils::{find_impl_block_end, find_struct_impl, generate_impl_text}, - AssistContext, AssistId, AssistKind, Assists, + AssistContext, AssistId, AssistKind, Assists, GroupLabel, }; // Assist: generate_setter @@ -46,7 +45,8 @@ pub(crate) fn generate_setter(acc: &mut Assists, ctx: &AssistContext) -> Option< )?; let target = field.syntax().text_range(); - acc.add( + acc.add_group( + &GroupLabel("Generate getter/setter".to_owned()), AssistId("generate_setter", AssistKind::Generate), "Generate a setter method", target, -- cgit v1.2.3