Skip to content

Instantly share code, notes, and snippets.

@tamago324
Created March 19, 2021 16:36
Show Gist options
  • Save tamago324/7c42c725ebabc6d0c8a14cbbf83f0fdf to your computer and use it in GitHub Desktop.
Save tamago324/7c42c725ebabc6d0c8a14cbbf83f0fdf to your computer and use it in GitHub Desktop.
{
"$schema": "",
"description": "Setting of rust-analyzer",
"properties": {
"rust-client.engine": {
"type": "string",
"enum": [
"rls",
"rust-analyzer"
],
"enumDescriptions": [
"Use the Rust Language Server (RLS)",
"Use the rust-analyzer language server (NOTE: not fully supported yet)"
],
"default": "rls",
"description": "The underlying LSP server used to provide IDE support for Rust projects.",
"scope": "window"
},
"rust-client.logToFile": {
"type": "boolean",
"default": false,
"description": "When set to true, RLS stderr is logged to a file at workspace root level. Requires reloading extension after change."
},
"rust-client.rustupPath": {
"type": "string",
"default": "rustup",
"description": "Path to rustup executable. Ignored if rustup is disabled.",
"scope": "machine"
},
"rust-client.rlsPath": {
"type": [
"string",
"null"
],
"default": null,
"description": "Override RLS path. Only required for RLS developers. If you set this and use rustup, you should also set `rust-client.channel` to ensure your RLS sees the right libraries. If you don't use rustup, make sure to set `rust-client.disableRustup`.",
"scope": "machine"
},
"rust-client.revealOutputChannelOn": {
"type": "string",
"enum": [
"info",
"warn",
"error",
"never"
],
"default": "never",
"description": "Specifies message severity on which the output channel will be revealed. Requires reloading extension after change."
},
"rust-client.updateOnStartup": {
"type": "boolean",
"default": false,
"description": "Update the Rust toolchain and its required components whenever the extension starts up."
},
"rust-client.autoStartRls": {
"type": "boolean",
"default": true,
"description": "Start RLS automatically when opening a file or project.",
"scope": "resource"
},
"rust-client.disableRustup": {
"type": "boolean",
"default": false,
"description": "Disable usage of rustup and use rustc/rls/rust-analyzer from PATH."
},
"rust-client.channel": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [
"default",
"stable",
"beta",
"nightly"
],
"enumDescriptions": [
"Uses the same channel as your currently open project",
"Explicitly use the `stable` channel",
"Explicitly use the `beta` channel",
"Explicitly use the `nightly` channel"
]
}
],
"default": "default",
"description": "Rust channel to invoke rustup with. Ignored if rustup is disabled. By default, uses the same channel as your currently open project."
},
"rust-client.trace.server": {
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Traces the communication between VS Code and the Rust language server.",
"scope": "window"
},
"rust-client.enableMultiProjectSetup": {
"type": [
"boolean",
"null"
],
"default": null,
"description": "Allow multiple projects in the same folder, along with removing the constraint that the cargo.toml must be located at the root. (Experimental: might not work for certain setups)"
},
"rust.sysroot": {
"type": [
"string",
"null"
],
"default": null,
"description": "--sysroot",
"scope": "resource"
},
"rust.target": {
"type": [
"string",
"null"
],
"default": null,
"description": "--target",
"scope": "resource"
},
"rust.rustflags": {
"type": [
"string",
"null"
],
"default": null,
"description": "Flags added to RUSTFLAGS.",
"scope": "resource"
},
"rust.clear_env_rust_log": {
"type": "boolean",
"default": true,
"description": "Clear the RUST_LOG environment variable before running rustc or cargo.",
"scope": "resource"
},
"rust.build_lib": {
"type": [
"boolean",
"null"
],
"default": null,
"description": "Specify to run analysis as if running `cargo check --lib`. Use `null` to auto-detect. (unstable)",
"scope": "resource"
},
"rust.build_bin": {
"type": [
"string",
"null"
],
"default": null,
"description": "Specify to run analysis as if running `cargo check --bin <name>`. Use `null` to auto-detect. (unstable)",
"scope": "resource"
},
"rust.cfg_test": {
"type": "boolean",
"default": false,
"description": "Build cfg(test) code. (unstable)",
"scope": "resource"
},
"rust.unstable_features": {
"type": "boolean",
"default": false,
"description": "Enable unstable features.",
"scope": "resource"
},
"rust.wait_to_build": {
"type": [
"number",
"null"
],
"default": null,
"description": "Time in milliseconds between receiving a change notification and starting build.",
"scope": "resource"
},
"rust.show_warnings": {
"type": "boolean",
"default": true,
"description": "Show warnings.",
"scope": "resource"
},
"rust.crate_blacklist": {
"type": [
"array",
"null"
],
"default": [
"cocoa",
"gleam",
"glium",
"idna",
"libc",
"openssl",
"rustc_serialize",
"serde",
"serde_json",
"typenum",
"unicode_normalization",
"unicode_segmentation",
"winapi"
],
"description": "Overrides the default list of packages for which analysis is skipped.\nAvailable since RLS 1.38",
"scope": "resource"
},
"rust.build_on_save": {
"type": "boolean",
"default": false,
"description": "Only index the project when a file is saved and not on change.",
"scope": "resource"
},
"rust.features": {
"type": "array",
"default": [],
"description": "A list of Cargo features to enable.",
"scope": "resource"
},
"rust.all_features": {
"type": "boolean",
"default": false,
"description": "Enable all Cargo features.",
"scope": "resource"
},
"rust.no_default_features": {
"type": "boolean",
"default": false,
"description": "Do not enable default Cargo features.",
"scope": "resource"
},
"rust.racer_completion": {
"type": "boolean",
"default": true,
"description": "Enables code completion using racer.",
"scope": "resource"
},
"rust.clippy_preference": {
"type": "string",
"enum": [
"on",
"opt-in",
"off"
],
"default": "opt-in",
"description": "Controls eagerness of clippy diagnostics when available. Valid values are (case-insensitive):\n - \"off\": Disable clippy lints.\n - \"on\": Display the same diagnostics as command-line clippy invoked with no arguments (`clippy::all` unless overridden).\n - \"opt-in\": Only display the lints explicitly enabled in the code. Start by adding `#![warn(clippy::all)]` to the root of each crate you want linted.\nYou need to install clippy via rustup if you haven't already.",
"scope": "resource"
},
"rust.jobs": {
"type": [
"number",
"null"
],
"default": null,
"description": "Number of Cargo jobs to be run in parallel.",
"scope": "resource"
},
"rust.all_targets": {
"type": "boolean",
"default": true,
"description": "Checks the project as if you were running cargo check --all-targets (I.e., check all targets and integration tests too).",
"scope": "resource"
},
"rust.target_dir": {
"type": [
"string",
"null"
],
"default": null,
"description": "When specified, it places the generated analysis files at the specified target directory. By default it is placed target/rls directory.",
"scope": "resource"
},
"rust.rustfmt_path": {
"type": [
"string",
"null"
],
"default": null,
"description": "When specified, RLS will use the Rustfmt pointed at the path instead of the bundled one",
"scope": "resource"
},
"rust.build_command": {
"type": [
"string",
"null"
],
"default": null,
"description": "EXPERIMENTAL (requires `unstable_features`)\nIf set, executes a given program responsible for rebuilding save-analysis to be loaded by the RLS. The program given should output a list of resulting .json files on stdout. \nImplies `rust.build_on_save`: true.",
"scope": "resource"
},
"rust.full_docs": {
"type": [
"boolean",
"null"
],
"default": null,
"description": "Instructs cargo to enable full documentation extraction during save-analysis while building the crate.",
"scope": "resource"
},
"rust.show_hover_context": {
"type": "boolean",
"default": true,
"description": "Show additional context in hover tooltips when available. This is often the type local variable declaration.",
"scope": "resource"
},
"rust.rust-analyzer": {
"type": "object",
"default": {},
"description": "Settings passed down to rust-analyzer server",
"scope": "resource"
},
"rust.rust-analyzer.releaseTag": {
"type": "string",
"default": "nightly",
"description": "Which binary release to download and use"
},
"rust.rust-analyzer.path": {
"type": [
"string",
"null"
],
"default": null,
"description": "When specified, uses the rust-analyzer binary at a given path"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment