Skip to content

Commit ee1628d

Browse files
committed
Mark most assists as the base "refactor" type
Most of them area. We will separate them out later but this gets them to show up in the "refactor" menu of vscode.
1 parent e75565c commit ee1628d

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

crates/rust-analyzer/src/main_loop/handlers.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ use lsp_types::{
1919
TextEdit, Url, WorkspaceEdit,
2020
};
2121
use ra_ide::{
22-
Assist, AssistId, FileId, FilePosition, FileRange, Query, RangeInfo, Runnable, RunnableKind,
23-
SearchScope,
22+
Assist, FileId, FilePosition, FileRange, Query, RangeInfo, Runnable, RunnableKind, SearchScope,
2423
};
2524
use ra_prof::profile;
2625
use ra_syntax::{AstNode, SyntaxKind, TextRange, TextSize};
@@ -702,15 +701,9 @@ fn create_single_code_action(assist: Assist, world: &WorldSnapshot) -> Result<Co
702701
arguments: Some(vec![arg]),
703702
};
704703

705-
let kind = match assist.id {
706-
AssistId("introduce_variable") => Some("refactor.extract.variable".to_string()),
707-
AssistId("add_custom_impl") => Some("refactor.rewrite.add_custom_impl".to_string()),
708-
_ => None,
709-
};
710-
711704
Ok(CodeAction {
712705
title,
713-
kind,
706+
kind: Some("refactor".to_owned()),
714707
diagnostics: None,
715708
edit: None,
716709
command: Some(command),

0 commit comments

Comments
 (0)