-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no error squiggles in VS Code with rls-vscode extension #443
Comments
Welcome to Rust! Luckily, a Cargo workspace is already set up for you -- so you won't have to make your own. The general procedure is:
If you still have problems with the VS Code extension, it might be best to ask on the Rust Discord (https://www.rust-lang.org/community). |
Unfortunately, it is half-expected. I think @fmoko Do you think it'd be worth exploring the possibility of changing the structure of the exercises so cargo (and other tools) can understand it? Not sure if "no analyzers" is a bug or a feature...? |
@jrvidal Hmm, I think it'd be at least worth trying. Maybe we can branch out, change the structure, see if the analyzer hints spoil some of the exercise solutions, and if they don't, we can merge it in? |
Hi @jrvidal I had the same issue with Rust in IntelliJ IDEA Ultimate very recently: no hints and some missing autocompletion IIRC. I haven't tried to circumvent it, maybe there's a trick. |
What if there were a Rustlings argument specifically for this purpose? One which works with (Bear with me as I explain: I've done some basic testing, but I don't know the internals of Rustlings. Also, I'll use VS Code as the example IDE, but it's just the example and this could potentially apply to any IDE) Instead of the user having edit each exercise directly, Rustlings could create a symlink (for example, UX improvements
Usage
[package]
name = 'exercises'
version = '0.1.0'
edition = '2018'
authors = ['The Rustlings Maintainers']
publish = false
[[bin]]
name = 'current'
path = 'current.rs' If using
If using
Issues
OtherMaybe it doesn't need to be an argument at all. Maybe it's just the default behavior, and it's ignored by everyone who doesn't want to use it. |
I fear that toying with symlinks and manipulating the file system will introduce more complexity that we can chew. I'm not sure how mature rust-analyzer, for instance, is with regards to its VFS implementation, I'm not sure swapping the content of files will work as seamlessly as we would like. I'm personally inclined to, instead of going too far with editor integration, perhaps exposing enough metadata so other folks/plugins can integrate easily with the curriculum. |
I realize my setup is just a single configuration amongst many. Tests can provide the information needed to know if these are real problems and will surface some of the details needed to evaluate the cost of potential solutions.
Can you expand more on this? |
It was mostly a random thought inspired by the aforementioned Jetbrains packaging of Rustlings. I think creating those highly-integrated experiences in your editor of choice might not be too difficult, given the metadata in the |
@jrvidal What kinds of metadata were you thinking about besides the ordered list of exercises/quizzes? For example, an integration would need to know which exercise is the "current" one, (or a listing of all with passed/failed status for each). How might that kind of state be managed and provided? |
Note also a rather different approach to "integration" with "IDEs" like emacs and vim and other editors at #281, which at least makes it easy to locate and open the next exercise in most any editor. |
If using |
Closing because the |
VS Code: 1.45.1
OS: 4.19.118-1-MANJARO
rls-vscode: 0.7.8
Creating a new crate/workspace like shown here the error squiggles work fine. But opening the root directory of rustlings (directory where Cargo.toml is located):
Is this a problem of the rustlings project directory structure? Opening src/main.rs and editing it, the error squiggles appear. Sorry if this topic isn't related to rustlings itself, it's my first time in the Rust world.
The text was updated successfully, but these errors were encountered: