Skip to content

Commit 8696030

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 9012b0d commit 8696030

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};
@@ -705,15 +704,9 @@ fn create_single_code_action(assist: Assist, world: &WorldSnapshot) -> Result<Co
705704
arguments: Some(vec![arg]),
706705
};
707706

708-
let kind = match assist.id {
709-
AssistId("introduce_variable") => Some("refactor.extract.variable".to_string()),
710-
AssistId("add_custom_impl") => Some("refactor.rewrite.add_custom_impl".to_string()),
711-
_ => None,
712-
};
713-
714707
Ok(CodeAction {
715708
title,
716-
kind,
709+
kind: Some("refactor".to_owned()),
717710
diagnostics: None,
718711
edit: None,
719712
command: Some(command),

0 commit comments

Comments
 (0)