The correct way to set up Rust with Vim

I've finally started to dive into Rust and want to clear up some of the issues when it comes to customizing everything beautiful.

I am using vim for Linux and found a good syntax highlighting plugin. Autocomplete is somewhat of a hassle though using phildawes / racer.

The plugin needs a src location for Rust, which isn't really anything big if I know where the directory is (I only found binaries and libraries when using the suggested installation curl <...> | sh

). The sources are loaded separately, although I haven't found an installation for Rust that sets the sources in let say, e.g. / usr / local / src / only binaries and libraries will rust.

Second, I looked through the Cargo docs and didn't find anything where the external links are cloned (wouldn't that be the source directory?)

Also should I update my Rust sources by tweaking everything manually, how would I be limping?

Is it quintessential to clone a rust store and build it yourself?

+3


source to share


1 answer


Plugin needs setting src location for rust, which is not really that big a deal if I knew where the directory is

I couldn't find sources either. If you just want sources without any history:

For 1.0.0

git clone --depth=1 --branch 1.0.0 --single-branch https://github.com/rust-lang/rust/

      

or for the night

git clone --depth=1 --single-branch https://github.com/rust-lang/rust/

      



Second, I went through the shipping documents and didn't find anything where the external links are cloned (wouldn't that be the original directory?)

In a standard installation, your home directory contains the directory .cargo

that contains the git/checkouts

cloned boxes.

You should probably try multirust , which makes it easy to manage multiple Rust installations in ~/.multirust

.

With multi-hulls, your checkboxes can be, for example, ~/.multirust/toolchains/nightly/cargo/git/checkouts

instead of ~/.cargo/git/checkout

.

Is quint essence to clone the rust store and build it yourself?

No, this, thankfully, is no longer necessary unless you are working on the / stdlibs compiler or trying to cross-compile. With multirust, the update is boiled down to multirust update

or multirust update nightly

, etc.

+1


source







All Articles