Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/solidlsp/language_servers/rust_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,19 @@ def _get_initialize_params(repository_absolute_path: str) -> InitializeParams:
"showUnlinkedFileNotification": True,
"showDependenciesExplorer": True,
"assist": {"emitMustUse": False, "expressionFillDefault": "todo"},
"cachePriming": {"enable": True, "numThreads": 0},
# rustback lightweight patch: serena's symbol tools don't need
# rust-analyzer's eager whole-workspace+deps cache priming, nor a
# re-index on every cargo metadata / target/ change. On large,
# actively-built Rust workspaces these drove rust-analyzer to
# 40+ GB RSS and re-indexed on every external `cargo build`.
# Disabling them keeps symbol navigation working at a fraction of
# the memory. NOTE: checkOnSave is intentionally left enabled below
# because serena's get_diagnostics_for_file relies on flycheck
# (`cargo check`) for Rust diagnostics. (Upstream: expose these as
# a config knob / a "lightweight" RA profile.)
"cachePriming": {"enable": False, "numThreads": 0},
"cargo": {
"autoreload": True,
"autoreload": False,
"buildScripts": {
"enable": True,
"invocationLocation": "workspace",
Expand Down
Loading