@@ -66,7 +66,7 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
6666 return Promise . resolve ( null ) ;
6767 } ) ;
6868 } ,
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
7070 // That's why we are not waiting for any command or edits
7171 async provideCodeActions ( document : vscode . TextDocument , range : vscode . Range , context : vscode . CodeActionContext , token : vscode . CancellationToken , _next : lc . ProvideCodeActionsSignature ) {
7272 const params : lc . CodeActionParams = {
@@ -87,7 +87,8 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
8787 continue ;
8888 }
8989 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 ) ;
9192 const group = ( item as any ) . group ;
9293 const id = ( item as any ) . id ;
9394 const resolveParams : ra . ResolveCodeActionParams = {
@@ -116,6 +117,7 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
116117 result [ index ] = items [ 0 ] ;
117118 } else {
118119 const action = new vscode . CodeAction ( group ) ;
120+ action . kind = items [ 0 ] . kind ;
119121 action . command = {
120122 command : "rust-analyzer.applyActionGroup" ,
121123 title : "" ,
0 commit comments