@@ -66,7 +66,7 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
66
66
return Promise . resolve ( null ) ;
67
67
} ) ;
68
68
} ,
69
- // Using custom handling of CodeActions where each code action is resloved lazily
69
+ // Using custom handling of CodeActions where each code action is resolved lazily
70
70
// That's why we are not waiting for any command or edits
71
71
async provideCodeActions ( document : vscode . TextDocument , range : vscode . Range , context : vscode . CodeActionContext , token : vscode . CancellationToken , _next : lc . ProvideCodeActionsSignature ) {
72
72
const params : lc . CodeActionParams = {
@@ -87,7 +87,8 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
87
87
continue ;
88
88
}
89
89
assert ( isCodeActionWithoutEditsAndCommands ( item ) , "We don't expect edits or commands here" ) ;
90
- const action = new vscode . CodeAction ( item . title ) ;
90
+ const kind = client . protocol2CodeConverter . asCodeActionKind ( ( item as any ) . kind ) ;
91
+ const action = new vscode . CodeAction ( item . title , kind ) ;
91
92
const group = ( item as any ) . group ;
92
93
const id = ( item as any ) . id ;
93
94
const resolveParams : ra . ResolveCodeActionParams = {
@@ -116,6 +117,7 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
116
117
result [ index ] = items [ 0 ] ;
117
118
} else {
118
119
const action = new vscode . CodeAction ( group ) ;
120
+ action . kind = items [ 0 ] . kind ;
119
121
action . command = {
120
122
command : "rust-analyzer.applyActionGroup" ,
121
123
title : "" ,
0 commit comments