Rust.tmbundle
Rust TextMate Bundle. A TextMate Bundle for the Rust programming langauage.
Install / Use
/learn @carols10cents/Rust.tmbundleREADME
Rust TextMate2 Bundle
A TextMate Bundle for the Rust programming language.
Installation
Without any extra dependencies:
- Download either the zip or tar
- Decompress
- Rename the subdirectory rust_tmbundle to rust.tmbundle
- Double click on rust.tmbundle to install in TextMate
If you'd like, and assuming you don't mind using Ruby, you can use the ruby gem
tmbundle-manager to makes managing and updating yourtextmate bundles easier:
Initial installation
gem install tmbundle-manager
tmb install carols10cents/rust
Updating
tmb update rust
Current Features:
- Basic Syntax Highlighting
- Code Snippets
- Commands (Note the cargo commands will only work in TextMate Nightly until https://github.com/textmate/textmate/pull/1305 is released):
- Autocompletion when racer is available (see instructions below)
How to enable autocompletion via racer
- Install racer by following the instructions in racer's README
- The textmate bundle will look in the following locations first for a
racerbinary, so either move or symlink[racer checkout directory]/target/release/racerinto one of these locations:/usr/local/bin/opt/local/bin$CARGO_INSTALL_ROOT/bin(if you have setCARGO_INSTALL_ROOTin TextMate)$CARGO_HOME/bin(if you have setCARGO_HOMEin TextMate)$HOME/.cargo/bin
- If you want your
racerbinary to be somewhere other than the locations in the last step, set theTM_RACERvariable in your TextMate preferences to the location of yourracerbinary. - Set the
RUST_SRC_PATHvariable in your TextMate preferences to the location of your Rust source directory (the same location that you set this variable to as part of the racer installation instructions).
Support for cross compilation:
So that this bundle can be used when cross compiling for Fuchsia, the TM_CARGO_NAME and TM_CARGO_PARAMS environmental variables can be used to cause the bundle to emit fargo cargo -- check instead of cargo check, for example. This could be extended to support other tools like
xargo if there's any interest.
Future Features:
- Improved Syntax Highlighting
- Block folding of functions
- File an issue if you have more ideas!
License
This bundle is licensed under the MIT License (LICENSE).
- Copyright (c) 2012 Tom Ellis
- Copyright (c) 2014 Elia Schito
- Copyright (c) 2015 Carol (Nichols || Goulding)
- Copyright (c) 2017 Google Inc
