From 586db0790c2bdcf4bb083f828e7c6f83a8d52a42 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 25 Mar 2023 20:54:24 +0100 Subject: [PATCH] minor: Add user facing command for reloading proc-macros in VSCode --- docs/dev/lsp-extensions.md | 10 ++++++++++ editors/code/package.json | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index 11eda94f5bb64..c157bab590e99 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md @@ -422,6 +422,16 @@ Returns internal status message, mostly for debugging purposes. Reloads project information (that is, re-executes `cargo metadata`). +## Reload proc-macros + +**Method:** `rust-analyzer/reloadProcMacros` + +**Request:** `null` + +**Response:** `null` + +Rebuilds build scripts and proc-macros, and runs the build scripts to reseed the build data. + ## Server Status **Experimental Client Capability:** `{ "serverStatusNotification": boolean }` diff --git a/editors/code/package.json b/editors/code/package.json index c5eb08748bfab..42cbc0e0d1fb5 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -199,6 +199,11 @@ "title": "Reload workspace", "category": "rust-analyzer" }, + { + "command": "rust-analyzer.reloadProcMacros", + "title": "Reload proc macros and build scripts", + "category": "rust-analyzer" + }, { "command": "rust-analyzer.addProject", "title": "Add current file's crate to workspace",