Install rustlings-fix and run it:
cargo install rustlings-fix
rustlings-fix
For more information on how the file this generates works checkout the Rust Analyzer Manual
Install rustlings-fix and run it:
cargo install rustlings-fix
rustlings-fix
For more information on how the file this generates works checkout the Rust Analyzer Manual
You are very sexy man
@alex-way haha thanks!
Generating this file is now built into rustlings:
rustlings lsp
I just installed rustlings
last night and this doesn't seem to be true. Have they removed this or has it just not made it in quite yet?
❯ rustlings lsp
Unrecognized argument: lsp
Run rustlings --help for more information.
❯ rustlings --help
Usage: rustlings [--nocapture] [-v] [<command>] [<args>]
Rustlings is a collection of small exercises to get you used to writing and reading Rust code
Options:
--nocapture show outputs from the test exercises
-v, --version show the executable version
--help display usage information
Commands:
verify Verifies all exercises according to the recommended order
watch Reruns `verify` when files were edited
run Runs/Tests a single exercise
hint Returns a hint for the given exercise
list Lists the exercises available in Rustlings
@Zolmok The version you installed must be older, uninstall it.
To get latest follow the commands in https://github.com/rust-lang/rustlings depending on OS:
curl -L https://raw.githubusercontent.com/rust-lang/rustlings/main/install.sh | bash
Open powershell as admin
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Start-BitsTransfer -Source https://raw.githubusercontent.com/rust-lang/rustlings/main/install.ps1 -Destination $env:TMP/install_rustlings.ps1; Unblock-File $env:TMP/install_rustlings.ps1; Invoke-Expression $env:TMP/install_rustlings.ps1
Which should give you:
❯ rustlings -v
v5.4.1
and:
❯ rustlings --help
...
Commands:
verify Verifies all exercises according to the recommended order
watch Reruns `verify` when files were edited
run Runs/Tests a single exercise
reset Resets a single exercise using "git stash -- <filename>"
hint Returns a hint for the given exercise
list Lists the exercises available in Rustlings
lsp Enable rust-analyzer for exercises
Very strange, I thought that's what I did. I did it again though and now I have the later version. One thing I changed is from stable to nightly. I wonder if that is the difference? At any rate I have the lsp version now, tyvm!
@Zolmok no problem happy it works!
Absolute hero. <3
so helpful!
Soo nice!!!!!!!!!!!! Thanks so much for this @jackos 🫶
nice!
I was struggling with this on vscode on windows and this fixed it for me ❤️
rustlings lsp
doesn't work with the latest rustlings:
$ /home/xxx/.cargo/bin/rustlings lsp
error: unrecognized subcommand 'lsp'
Usage: rustlings [OPTIONS] [COMMAND]
For more information, try '--help'.
$ /home/xxx/.cargo/bin/rustlings --version
rustlings 6.4.0
Thanks ghost
they deleted it a while back for some reason, the old method still works:
cargo install rustlings-fix
rustlings-fix
Updated the gist above
worked like a charm!