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 {
198198 pub lens : LensConfig ,
199199 pub hover : HoverConfig ,
200200 pub semantic_tokens_refresh : bool ,
201+ pub code_lens_refresh : bool ,
201202
202203 pub linked_projects : Vec < LinkedProject > ,
203204 pub root_path : AbsPathBuf ,
@@ -340,6 +341,7 @@ impl Config {
340341 lens : LensConfig :: default ( ) ,
341342 hover : HoverConfig :: default ( ) ,
342343 semantic_tokens_refresh : false ,
344+ code_lens_refresh : false ,
343345 linked_projects : Vec :: new ( ) ,
344346 root_path,
345347 } ;
@@ -581,6 +583,12 @@ impl Config {
581583 {
582584 self . semantic_tokens_refresh = refresh_support;
583585 }
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+ }
584592 }
585593 }
586594
Original file line number Diff line number Diff line change @@ -369,6 +369,11 @@ impl GlobalState {
369369 self . semantic_tokens_cache . lock ( ) . clear ( ) ;
370370 self . send_request :: < lsp_types:: request:: SemanticTokensRefesh > ( ( ) , |_, _| ( ) ) ;
371371 }
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+ }
372377 }
373378
374379 if let Some ( diagnostic_changes) = self . diagnostics . take_changes ( ) {
You can’t perform that action at this time.
0 commit comments