From e26bb05567452cfc71fa6aedc1862360d6d22474 Mon Sep 17 00:00:00 2001 From: Doods <80251531+Doods0@users.noreply.github.com> Date: Tue, 22 Apr 2025 18:27:47 +0200 Subject: [PATCH] docs: Update "checkOnSave" to "check" (#29212) As-salamu alaykum, [I recently started suffering from the same issue as this user](https://users.rust-lang.org/t/rust-analyzer-checkonsave-command-works-but-shows-invalid-config-warning/128652), which is caused by something the docs of Zed promote, so I decided to help fix it. >[anutrix](https://users.rust-lang.org/u/anutrix) > When I add "rust-analyzer.checkOnSave.command": "clippy" I get: > > invalid config value: /checkOnSave: invalid type: map, expected a boolean; > Extension Info: Version 0.3.2433, Server Version 0.3.2433-standalone (66e3b5819e 2025-04-21) > and in Language Server logs: > > [Error - 3:26:22 AM] Server process exited with code 0. > Clippy works fine but these warnings stays and extensions shows yellow/unstable in VSCode: > > Additionally, if I replace > > "rust-analyzer.checkOnSave.command": "clippy" > with > > "rust-analyzer.checkOnSave": true, > "rust-analyzer.checkOnSave.command": "clippy" > [jplatte](https://users.rust-lang.org/u/jplatte) > From the documentation, it seems like rust-analyzer.checkOnSave.command does not exist. It should be rust-analyzer.check.command. --- docs/src/configuring-languages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/configuring-languages.md b/docs/src/configuring-languages.md index 86ef4810b849f18bc84b081b41186e14cbfa120b..e4eb53d4979ae1bccd28e2172d54ec49430fcec7 100644 --- a/docs/src/configuring-languages.md +++ b/docs/src/configuring-languages.md @@ -143,7 +143,7 @@ Many language servers accept custom configuration options. You can set these in "lsp": { "rust-analyzer": { "initialization_options": { - "checkOnSave": { + "check": { "command": "clippy" } }