Reference Documentation for Rust Analyzer Options

2020-02-10

Rust Analyzer Options

TOC

Rust Analyzer

Rust Analyzer {#configuration_Rust Analyzer}

rust-analyzer.highlightingOn

type: boolean
default: False
Highlight Rust code (overrides built-in syntax highlighting)

rust-analyzer.rainbowHighlightingOn

type: boolean
default: False
When highlighting Rust code, use a unique color per identifier

rust-analyzer.featureFlags

type: object
default: {}
Fine grained feature flags to disable annoying features

rust-analyzer.raLspServerPath

type: ['null', 'string']
Path to ra_lsp_server executable (points to bundled binary by default)

rust-analyzer.excludeGlobs

type: array
default: []
Paths to exclude from analysis

rust-analyzer.useClientWatching

type: boolean
default: True
client provided file watching instead of notify watching.

rust-analyzer.cargo-watch.enable

type: boolean
default: True
Run cargo check for diagnostics on save

rust-analyzer.cargo-watch.arguments

type: array
default: []
cargo-watch arguments. (e.g: --features="shumway,pdf" will run as cargo watch -x "check --features="shumway,pdf"" )

rust-analyzer.cargo-watch.command

type: string
default: check
cargo-watch command. (e.g: clippy will run as cargo watch -x clippy )

rust-analyzer.cargo-watch.allTargets

type: boolean
default: True
Check all targets and tests (will be passed as --all-targets)

rust-analyzer.trace.server

type: string
default: off
Trace requests to the ra_lsp_server

possible values

value description
off No traces
messages Error only
verbose Full log
key value
scope window

rust-analyzer.lruCapacity

type: ['number', 'null']
Number of syntax trees rust-analyzer keeps in memory

rust-analyzer.displayInlayHints

type: boolean
default: True
Display additional type and parameter information in the editor

rust-analyzer.maxInlayHintLength

type: number
default: 20
Maximum length for inlay hints

rust-analyzer.cargoFeatures.noDefaultFeatures

type: boolean
default: False
Do not activate the default feature

rust-analyzer.cargoFeatures.allFeatures

type: boolean
default: True
Activate all available features

rust-analyzer.cargoFeatures.features

type: array
default: []
List of features to activate