rust-analyzer/editors/code
bors[bot] 40009e07d0
Merge #11145
11145: feat: add config to use reasonable default expression instead of todo! when filling missing fields r=Veykril a=bnjjj

Use `Default::default()` in struct fields when we ask to fill it instead of putting `todo!()` for every fields

before:

```rust
pub enum Other {
    One,
    Two,
}

pub struct Test {
    text: String,
    num: usize,
    other: Other,
}

fn t_test() {
    let test = Test {<|>};
}
``` 

after: 

```rust
pub enum Other {
    One,
    Two,
}

pub struct Test {
    text: String,
    num: usize,
    other: Other,
}

fn t_test() {
    let test = Test {
        text: String::new(),
        num: 0,
        other: todo!(),
    };
}
``` 



Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Coenen Benjamin <benjamin.coenen@hotmail.com>
2022-01-07 14:10:11 +00:00
..
src Fix server path on NixOS 2021-12-30 14:50:54 +02:00
tests Bump vscode-test 2021-12-03 20:40:29 +02:00
.eslintignore vscode extension: use esbuild instead of rollup. 2021-08-10 10:18:08 +01:00
.eslintrc.js handle promise catches 2021-02-07 21:27:21 +03:30
.gitignore Publish platform-specific Code VSIXes 2021-12-18 22:49:11 +02:00
.vscodeignore Prepare Code extension for bundling 2021-12-18 17:44:16 +02:00
icon.png Extension icon 2020-01-15 16:07:39 +01:00
language-configuration.json configure colorizedBracketPairs 2021-09-09 00:25:38 -04:00
LICENSE Add LICENSE file to make vsce happy 2021-12-04 12:29:27 +02:00
package-lock.json Remove node-fetch and https-proxy-agent deps 2021-12-23 09:23:56 +02:00
package.json Merge #11145 2022-01-07 14:10:11 +00:00
ra_syntax_tree.tmGrammar.json Fix .rast tmGrammar to account for numbers in identifiers 2020-04-22 02:00:58 +03:00
README.md Remove note about alpha status from vscode extension descritpion 2021-12-27 01:26:25 +00:00
tsconfig.json Type-check TS on CI and also turn off the strict setting useUnknownInCatchVariables 2021-11-04 01:23:45 +02:00

rust-analyzer

Provides support for rust-analyzer: novel LSP server for the Rust programming language.

Note the extension may cause conflicts with the official Rust extension. It is recommended to disable the Rust extension when using the rust-analyzer extension.

Sponsor

Work on rust-analyzer is sponsored by

Ferrous Systems

If you want to sponsor:

Features

Quick start

  1. Install rustup
  2. Install the rust-analyzer extension

Configuration

This extension provides configurations through VSCode's configuration settings. All the configurations are under rust-analyzer.*.

See https://rust-analyzer.github.io/manual.html#vs-code-2 for more information on VSCode specific configurations.

Communication

For usage and troubleshooting requests, please use "IDEs and Editors" category of the Rust forum:

https://users.rust-lang.org/c/ide/14

Documentation

See https://rust-analyzer.github.io/ for more information.