how to make rust-analyzer recognize sub-folders

1.6k Views Asked by At

rust-analyzer recognizes examples folder , and what I want is to recognize it, sub-folders like 'examples/borrowship/' so I can collect useful snippets and study under in one project, is there any way ? vs code example folder

1

There are 1 best solutions below

1
On BEST ANSWER

The contents of examples/ are analyzed by Cargo target auto-discovery. There is no way to expand the automatic behavior of looking for files (or directories with main.rs files) in examples/; you can only disable it entirely, or add individual targets manually.