File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ pub struct Config {
198
198
pub lens : LensConfig ,
199
199
pub hover : HoverConfig ,
200
200
pub semantic_tokens_refresh : bool ,
201
+ pub code_lens_refresh : bool ,
201
202
202
203
pub linked_projects : Vec < LinkedProject > ,
203
204
pub root_path : AbsPathBuf ,
@@ -340,6 +341,7 @@ impl Config {
340
341
lens : LensConfig :: default ( ) ,
341
342
hover : HoverConfig :: default ( ) ,
342
343
semantic_tokens_refresh : false ,
344
+ code_lens_refresh : false ,
343
345
linked_projects : Vec :: new ( ) ,
344
346
root_path,
345
347
} ;
@@ -581,6 +583,12 @@ impl Config {
581
583
{
582
584
self . semantic_tokens_refresh = refresh_support;
583
585
}
586
+
587
+ if let Some ( refresh_support) =
588
+ workspace_caps. code_lens . as_ref ( ) . and_then ( |it| it. refresh_support )
589
+ {
590
+ self . code_lens_refresh = refresh_support;
591
+ }
584
592
}
585
593
}
586
594
Original file line number Diff line number Diff line change @@ -369,6 +369,11 @@ impl GlobalState {
369
369
self . semantic_tokens_cache . lock ( ) . clear ( ) ;
370
370
self . send_request :: < lsp_types:: request:: SemanticTokensRefesh > ( ( ) , |_, _| ( ) ) ;
371
371
}
372
+
373
+ // Refresh code lens if the client supports it.
374
+ if self . config . code_lens_refresh {
375
+ self . send_request :: < lsp_types:: request:: CodeLensRefresh > ( ( ) , |_, _| ( ) ) ;
376
+ }
372
377
}
373
378
374
379
if let Some ( diagnostic_changes) = self . diagnostics . take_changes ( ) {
You can’t perform that action at this time.
0 commit comments