All Projects → rust-lang → Vscode Rust

rust-lang / Vscode Rust

Licence: other
Rust extension for Visual Studio Code

Programming Languages

typescript
32286 projects
rust
11053 projects

Projects that are alternatives of or similar to Vscode Rust

Tailwindcss Intellisense
Intelligent Tailwind CSS tooling for Visual Studio Code
Stars: ✭ 1,066 (-9.97%)
Mutual labels:  vscode-extension
Better Toml
toml extension for vs code editor
Stars: ✭ 60 (-94.93%)
Mutual labels:  vscode-extension
Icie
Competitive programming IDE-as-a-VS-Code-plugin
Stars: ✭ 65 (-94.51%)
Mutual labels:  vscode-extension
Vue Theme Vscode
+200.000 installs ⬇️ Theme for Visual Studio Code inspired by Vue.js, with support for more popular languages, trying to maintain a perfect harmony of colors.
Stars: ✭ 54 (-95.44%)
Mutual labels:  vscode-extension
Vscode Org Mode
Emacs Org Mode for Visual Studio Code
Stars: ✭ 1,096 (-7.43%)
Mutual labels:  vscode-extension
Vscode Surround
🔥A simple yet powerful extension to add wrapper templates around your code blocks
Stars: ✭ 60 (-94.93%)
Mutual labels:  vscode-extension
Vscode Openshift Tools
Microsoft Visual Studio Code extension for OpenShift
Stars: ✭ 51 (-95.69%)
Mutual labels:  vscode-extension
Vscode Map Preview
VSCode map preview extension
Stars: ✭ 70 (-94.09%)
Mutual labels:  vscode-extension
Tabnine
AI Code Completions
Stars: ✭ 8,863 (+648.56%)
Mutual labels:  vscode-extension
Vscode Git Semantic Commit
💬 A Visual Studio Code extension which enables to commit simply by the semantic message conventions
Stars: ✭ 65 (-94.51%)
Mutual labels:  vscode-extension
Vue Vscode Snippets
These snippets were built to supercharge my workflow in the most seamless manner possible.
Stars: ✭ 1,083 (-8.53%)
Mutual labels:  vscode-extension
Vscode Bcdn
A Plugin for easy bootstrap markup and template
Stars: ✭ 58 (-95.1%)
Mutual labels:  vscode-extension
Vscode Sftp
Super fast sftp/ftp extension for VS Code
Stars: ✭ 1,121 (-5.32%)
Mutual labels:  vscode-extension
Vscode Smoothtype
VS Code extension to add cursor transitions while typing, similar to MS Office and the Windows 10 Mail app.
Stars: ✭ 54 (-95.44%)
Mutual labels:  vscode-extension
Vscode Rsync
rsync extension for visual studio code
Stars: ✭ 68 (-94.26%)
Mutual labels:  vscode-extension
Qiskit Vscode
Simplifying Qiskit to make developing quantum circuits and applications faster
Stars: ✭ 52 (-95.61%)
Mutual labels:  vscode-extension
Vscode Svgviewer
SVG Viewer for Visual Studio Code
Stars: ✭ 60 (-94.93%)
Mutual labels:  vscode-extension
Doki Theme Vscode
Code with your waifu! Here are a bunch of themes for VS-Code. Choose a girl from various anime series, manga, and visual novels such as: Re:Zero, KillLaKill and Doki-Doki Literature Club.
Stars: ✭ 67 (-94.34%)
Mutual labels:  vscode-extension
Markdown Formatter
markdown formatter
Stars: ✭ 70 (-94.09%)
Mutual labels:  vscode-extension
Vscode Csscomb
🔌 VS Code plugin for CSScomb — CSS coding style formatter.
Stars: ✭ 63 (-94.68%)
Mutual labels:  vscode-extension

Rust support for Visual Studio Code

VSCode + Node.js CI

Adds language support for Rust to Visual Studio Code. Supports:

  • code completion
  • jump to definition, peek definition, find all references, symbol search
  • types and documentation on hover
  • code formatting
  • refactoring (rename, deglob)
  • error squiggles and apply suggestions from errors
  • snippets
  • build tasks

Rust support is powered by a separate language server - either by the official Rust Language Server (RLS) or rust-analyzer, depending on the user's preference. If you don't have it installed, the extension will install it for you (with permission).

This extension is built and maintained by the Rust IDEs and editors team. Our focus is on providing a stable, high quality extension that makes the best use of the respective language server. We aim to support as many features as possible, but our priority is supporting the essential features as well as possible.

For support, please file an issue on the repo or talk to us on Discord. For RLS, there is also some troubleshooting and debugging advice.

Contribution

Contributing code, tests, documentation, and bug reports is appreciated! For more details see contributing.md.

Quick start

  1. Install rustup (Rust toolchain manager).
  2. Install this extension from the VSCode Marketplace (or by entering ext install rust-lang.rust at the command palette Ctrl+P).
  3. (Skip this step if you already have Rust projects that you'd like to work on.) Create a new Rust project by following these instructions.
  4. Open a Rust project (File > Add Folder to Workspace...). Open the folder for the whole project (i.e., the folder containing Cargo.toml, not the src folder).
  5. You'll be prompted to install the Rust server. Once installed, it should start analyzing your project (RLS will also have to to build the project).

Configuration

This extension provides options in VSCode's configuration settings. These include rust.*, which are passed directly to RLS, and the rust-client.* , which mostly deal with how to spawn it or debug it. You can find the settings under File > Preferences > Settings; they all have IntelliSense help.

Examples:

  • rust.show_warnings - set to false to silence warnings in the editor.
  • rust.all_targets - build and index code for all targets (i.e., integration tests, examples, and benches)
  • rust.cfg_test - build and index test code (i.e., code with #[cfg(test)]/#[test])
  • rust-client.channel - specifies from which toolchain the RLS should be spawned

TIP: To select the underlying language server, set rust-client.engine accordingly!

Features

Snippets

Snippets are code templates which expand into common boilerplate. IntelliSense includes snippet names as options when you type; select one by pressing enter. You can move to the next snippet 'hole' in the template by pressing tab. We provide the following snippets:

  • for - a for loop
  • macro_rules - declare a macro
  • if let - an if let statement for executing code only when a pattern matches
  • spawn - spawn a thread
  • extern crate - insert an extern crate statement

This extension is deliberately conservative about snippets and doesn't include too many. If you want more, check out Trusty Rusty Snippets.

Tasks

The plugin provides tasks for building, running, and testing using the relevant cargo commands. You can build using ctrl+shift+b(Win/Linux), cmd+shift+b(macOS). Access other tasks via Run Task in the command palette.

The plugin writes these into tasks.json. The plugin will not overwrite existing tasks, so you can customise these tasks. To refresh back to the defaults, delete tasks.json and restart VSCode.

Format on save

To enable formatting on save, you need to set the editor.formatOnSave setting to true. Find it under File > Preferences > Settings.

Requirements

  • Rustup,
  • A Rust toolchain (the extension will configure this for you, with permission),
  • rls, rust-src, and rust-analysis components (the extension will install these for you, with permission). Only rust-src is required when using rust-analyzer.

Implementation

Both language servers can use Cargo to get more information about Rust projects and both use rustfmt extensively to format the code.

RLS uses Cargo and also the Rust compiler (rustc) in a more direct fashion, where it builds the project and reuses the data computed by the compiler itself. To provide code completion it uses a separate tool called racer.

Rust Analyzer is a separate compiler frontend for the Rust language that doesn't use the Rust compiler (rustc) directly but rather performs its own analysis that's tailor-fitted to the editor/IDE use case.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].