Giter Club home page Giter Club logo

racer's Introduction

Racer - code completion for Rust

Build Status Build status

racer completion screenshot

racer eldoc screenshot

RACER = Rust Auto-Complete-er. A utility intended to provide Rust code completion for editors and IDEs. Maybe one day the 'er' bit will be exploring + refactoring or something.

Installation

With cargo install

This method requires Rust 1.5. Simply run:

cargo install racer

As mentioned in the command output, don't forget to add the installation directory to your PATH.

From sources

  1. Clone the repository: git clone https://github.com/racer-rust/racer.git

  2. cd racer; cargo build --release. The binary will now be in ./target/release/racer

  3. Add the binary to your PATH. This can be done by moving it to a directory already in your PATH (i.e. /usr/local/bin) or by adding the ./target/release/ directory to your PATH

Configuration

  1. Fetch the Rust sourcecode

    1. automatically via rustup and run rustup component add rust-src in order to install the source to $(rustc --print sysroot)/lib/rustlib/src/rust/src. Rustup will keep the sources in sync with the toolchain if you run rustup update.

    2. manually from git, or download from https://www.rust-lang.org/install.html (the 'rustc' source download behind the 'source' link is the right one).

  2. Set the RUST_SRC_PATH environment variable to point to the 'src' dir in the Rust source installation

    (e.g. % export RUST_SRC_PATH=/usr/local/src/rust/src or % export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src" )

  3. Test on the command line:

    racer complete std::io::B (should show some completions)

Editors/IDEs Supported

Eclipse integration

Racer can be used with Eclipse through the use of RustDT. (User guide is linked in repo description)

Emacs integration

Emacs integration has been moved to a separate project: emacs-racer.

Gedit integration

Gedit integration can be found here.

Builder integration

Gnome Builder integration can be found here

Kate integration

The Kate community maintains a plugin. It is bundled with recent releases of Kate (tested with 16.08 - read more here).

  1. Enable 'Rust code completion' in the plugin list in the Kate config dialog;

  2. On the new 'Rust code completion' dialog page, make sure 'Racer command' and 'Rust source tree location' are set correctly.

Sublime Text integration

The Sublime Text community maintains some packages that integrates Racer

  • RustAutoComplete that offers auto completion and goto definition.
  • AnacondaRUST from the anaconda plugins family that offers auto completion, goto definition and show documentation

Vim integration

Vim integration has been moved to a separate project: vim-racer.

Visual Studio Code extension

Racer recommends the vscode-rust extension. This is an actively-maintained fork of the now-deprecated RustyCode extension.

Atom integration

You can find the racer package for Atom here

Kakoune integration

Kakoune comes with a builtin integration for racer auto completion.

racer's People

Contributors

phildawes avatar teddriggs avatar jwilm avatar birkenfeld avatar jaxx avatar ebfe avatar tafia avatar kngwyu avatar golddranks avatar wilfred avatar estebank avatar pmarcelll avatar andjo403 avatar fbergroth avatar hk47196 avatar jonesey13 avatar shougo avatar yodalee avatar zsiciarz avatar nrc avatar ane avatar tamird avatar bgluth avatar renato-zannon avatar sinkuu avatar bkchr avatar byron avatar victor-savu avatar szotp avatar goldenbadger avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.