create: Cursor 中用 rust-analyzer 0.4.3114 而不是 RLS

MemRelay-Operation: memory-save:uiframe-ra-vsix-20261122
MemRelay-Resource: 2c9a401a-4f61-4a4a-82a1-d1dd311a6e5b
This commit is contained in:
2026-11-22 01:52:24 +08:00
parent b66c95005d
commit c4e699cecc
@@ -0,0 +1,23 @@
---
title: Cursor 中用 rust-analyzer 0.4.3114 而不是 RLS
type: experience
permalink: main/projects/0017cd22-9dea-4f87-9595-fc050356ff3c/cursor-中用-rust-analyzer-0.4.3114-而不是-rls
stable_id: 2c9a401a-4f61-4a4a-82a1-d1dd311a6e5b
scope: project
memory_type: experience
project_id: 0017cd22-9dea-4f87-9595-fc050356ff3c
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 1
request_id: uiframe-ra-vsix-20261122
created_at: '2026-11-21T17:52:21.376282+00:00'
updated_at: '2026-11-21T17:52:21.376282+00:00'
tags:
- rust
- cursor
- rust-analyzer
---
Cursor 3.31.11 对扩展报告 VS Code 1.128.0。应用商店里的 rust-lang.rust-analyzer 被标成 Windows 64 位不可用,且 0.4.3115 及更新要求 engines.vscode ^1.144.0,CLI 会拒绝安装。可用做法是从 Open VSX 下载 win32-x64 VSIX,版本用 rust-analyzer 0.4.3114(engines ^1.93.0,2026-11-09),已装到本机。不要装 rust-lang.rust:它默认要求已从 stable 工具链移除的 rls 组件。
工作区根目录 E:\\code\\UIFrame 没有 Cargo.toml,语言服务会报 failed to find any projects。已在 .vscode/settings.json 设 rust-analyzer.linkedProjects 为 E:/code/UIFrame/qt/rust/Cargo.toml,并打开 restartServerOnConfigChange。这样打开 .rs 文件有高亮,Ctrl+单击可以跳到定义。Qt 的 QMAKE 仍由 qt/rust/.cargo/config.toml 提供。