Intellij-rust is excellent


#1

To https://users.rust-lang.org/users/matklad/ and all of the people working on intellij-rust:

It’s excellent. Everyone on my team has switched to it. It’s making life in Rust land a lot easier.

Thank you for taking the time to build that software.


#2

:heart:

Rust is awesome (especially the people), and it is extremely fulfilling to work on the tooling for this excellent language :slight_smile:

BTW, I am attending the Rust conf in Portland, so there will be a chance to submit bug reports in person :wink:


#3

I am impressed by the idea vim emulation, I haven’t found anything buggy yet.

But I think intellij-rust doesn’t work at the moment with cargo workspaces right? I am currently developing a library and I split it into different crates. Vulkano does the same thing, but it seems intellij-rust doesn’t like this.

Update:

Nvm I think it is not related the workspaces, it just gets confused when there are more crates inside a single folder.

If I open every crate as a new project, that seems to work.

Update2:

Goto Class or ctrl+n is super awesome, I need that in my vim workflow somehow.


#4

I’m going to Rust Belt Rust Conf. I wish I could attend Rust Conf in Portland but it wasn’t in the cards this year.


#5

I’ll have to give intellij-rust another go. I tried it about a week ago but got no autocomplete support on my small projects but maybe it’s just me.

I love the speed of Visual Studio Code but I think an Intellij plugin has the potential for a much more streamlined (and quicker) feedback loop.


#6

For multi crate projects, I’ve gotten them working reasonably well by opening the root directory as a resource (not Rust) project, and then importing each crate as a new module from existing sources. It’d be great if the plugin could parse a workspace Cargo.toml and automatically do that though!


#7

Wow, so workspaces are already used by projects in the wild? Will fix cargo metadata command to support them.


#8

Yep! An example: https://github.com/sfackler/rust-openssl/blob/master/Cargo.toml


#9

@matklad Maybe this is the wrong thread but I’ve to questions regarding intellij-rust, first, how does it handle different Rust versions and is rustup required?
Second, can I use clippy from within intellij-rust?


#10

We don’t have special support for any of these at the moment :slight_smile:

If you use rustup, then you should specify .cargo/bin as a toolchain location (though it should be guest automatically in most cases), and then the current active or override will be used.

if you don’t use rustup, then you’ll need to switch toolchain paths manually.

We plan to provide a better integration with rustup so that you could, for example, use different toolchains for different run configurations. The issue is here: https://github.com/intellij-rust/intellij-rust/issues/308.

With some effort, this can be emulated with the help of RUSTUP_TOOLCHAIN environment variable. That is, you can use RUSTUP_TOOLCHAIN=nightly in a run configuration specifically for running clippy, and use =stable for usual development.

I think that we could provide a way to select between different non-rustup toolchain, but I’d much rather offload all toolchain management to rustup.


#11

With today’s nightly Cargo and the latest alpha/nightly of IntelliJ Rust you should be able to simply import a directory with a top level Cargo.toml which defines workspace.