I decided to try rustlings as a first step to getting more familiar with rust. (my experience is mostly in Java/C/Python)
I ran the installer - already had the prereqs installed via homebrew on macos.
I then opened the root directory of the git clone in vscode. I installed an appropriate set of extensions in a clean profile, including rust-analyzer.
I've also run rustlings lsp
(and reloaded the workspace) but I have only syntax highlighting in vscode - no warnings/errors. I do get hover help though for the functions.
The generated file was:
{"sysroot_src":"/Users/XXX/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library","crates":[{"root_module":"exercises/clippy/clippy1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/clippy/clippy2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/clippy/clippy3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/conversions/as_ref_mut.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/conversions/from_into.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/conversions/from_str.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/conversions/try_from_into.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/conversions/using_as.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/enums/enums1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/enums/enums2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/enums/enums3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/error_handling/errors1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/error_handling/errors2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/error_handling/errors3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/error_handling/errors4.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/error_handling/errors5.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/error_handling/errors6.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/functions/functions1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/functions/functions2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/functions/functions3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/functions/functions4.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/functions/functions5.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/generics/generics1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/generics/generics2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/hashmaps/hashmaps1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/hashmaps/hashmaps2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/hashmaps/hashmaps3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/if/if1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/if/if2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/if/if3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/intro/intro1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/intro/intro2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/iterators/iterators1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/iterators/iterators2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/iterators/iterators3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/iterators/iterators4.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/iterators/iterators5.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/lifetimes/lifetimes1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/lifetimes/lifetimes2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/lifetimes/lifetimes3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/macros/macros1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/macros/macros2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/macros/macros3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/macros/macros4.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/modules/modules1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/modules/modules2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/modules/modules3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/move_semantics/move_semantics1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/move_semantics/move_semantics2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/move_semantics/move_semantics3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/move_semantics/move_semantics4.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/move_semantics/move_semantics5.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/move_semantics/move_semantics6.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/options/options1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/options/options2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/options/options3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/primitive_types/primitive_types1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/primitive_types/primitive_types2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/primitive_types/primitive_types3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/primitive_types/primitive_types4.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/primitive_types/primitive_types5.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/primitive_types/primitive_types6.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/quiz1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/quiz2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/quiz3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/smart_pointers/arc1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/smart_pointers/box1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/smart_pointers/cow1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/smart_pointers/rc1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/strings/strings1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/strings/strings2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/strings/strings3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/strings/strings4.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/structs/structs1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/structs/structs2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/structs/structs3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/tests/tests1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/tests/tests2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/tests/tests3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/tests/tests4.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/threads/threads1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/threads/threads2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/threads/threads3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/traits/traits1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/traits/traits2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/traits/traits3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/traits/traits4.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/traits/traits5.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/variables/variables1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/variables/variables2.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/variables/variables3.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/variables/variables4.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/variables/variables5.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/variables/variables6.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/vecs/vecs1.rs","edition":"2021","deps":[],"cfg":["test"]},{"root_module":"exercises/vecs/vecs2.rs","edition":"2021","deps":[],"cfg":["test"]}]}
I also tried adding
{
"rust-analyzer.linkedProjects": [
"./Cargo.toml"
]
}
which felt unnecessary from the docs - though it made no difference.
Any tips on getting the extension to work