File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/tools/rust-analyzer/crates/rust-analyzer/src Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -564,6 +564,23 @@ impl GlobalState {
564
564
. collect ( )
565
565
} ;
566
566
567
+ // Also explicitly watch any build files configured in JSON project files.
568
+ for ws in self . workspaces . iter ( ) {
569
+ if let ProjectWorkspaceKind :: Json ( project_json) = & ws. kind {
570
+ for ( _, krate) in project_json. crates ( ) {
571
+ let Some ( build) = & krate. build else {
572
+ continue ;
573
+ } ;
574
+ watchers. push ( lsp_types:: FileSystemWatcher {
575
+ glob_pattern : lsp_types:: GlobPattern :: String (
576
+ build. build_file . to_string ( ) ,
577
+ ) ,
578
+ kind : None ,
579
+ } ) ;
580
+ }
581
+ }
582
+ }
583
+
567
584
watchers. extend (
568
585
iter:: once ( Config :: user_config_path ( ) )
569
586
. chain ( self . workspaces . iter ( ) . map ( |ws| ws. manifest ( ) . map ( ManifestPath :: as_ref) ) )
You can’t perform that action at this time.
0 commit comments