File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,11 @@ impl ProjectFolders {
265
265
entries. push ( manifest. to_owned ( ) ) ;
266
266
}
267
267
268
+ for buildfile in ws. buildfiles ( ) {
269
+ file_set_roots. push ( VfsPath :: from ( buildfile. to_owned ( ) ) ) ;
270
+ entries. push ( buildfile. to_owned ( ) ) ;
271
+ }
272
+
268
273
// In case of detached files we do **not** look for a rust-analyzer.toml.
269
274
if !matches ! ( ws. kind, ProjectWorkspaceKind :: DetachedFile { .. } ) {
270
275
let ws_root = ws. workspace_root ( ) ;
Original file line number Diff line number Diff line change @@ -539,6 +539,17 @@ impl ProjectWorkspace {
539
539
}
540
540
}
541
541
542
+ pub fn buildfiles ( & self ) -> Vec < AbsPathBuf > {
543
+ match & self . kind {
544
+ ProjectWorkspaceKind :: Json ( project) => project
545
+ . crates ( )
546
+ . filter_map ( |( _, krate) | krate. build . as_ref ( ) . map ( |build| build. build_file . clone ( ) ) )
547
+ . map ( AbsPathBuf :: assert)
548
+ . collect ( ) ,
549
+ _ => vec ! [ ] ,
550
+ }
551
+ }
552
+
542
553
pub fn find_sysroot_proc_macro_srv ( & self ) -> anyhow:: Result < AbsPathBuf > {
543
554
self . sysroot . discover_proc_macro_srv ( )
544
555
}
You can’t perform that action at this time.
0 commit comments