rust-lang / vscode-rust

Rust extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=rust-lang.rust
Other
1.39k stars 167 forks source link

"rust.show_warnings": false does nothing #807

Open popnfloss opened 4 years ago

popnfloss commented 4 years ago

Turning off warnings has no effect.

cyberillithid commented 4 years ago

As far as I can see, with the edit of synchronization method (listing OBSERVED_SETTINGS in src/rls.ts) have broken the application of the falsy (i.e., false, null, 0, etc) values to the didChangeConfiguration notification, as VSCode-LanguageServer-Client checks it non-strictly.

(The same happens to "rust.all_targets": false, by the way).

I'm not sure whether this is intentional on the languageserver-client side, but immediately patching the aforelinked line in your .vscode/extensions/rust-lang.rust-X.X.X/node_modules/vscode-languageclient/lib/client.js to if (config !== null) allows those falsy values to propagate to the Rust Language Server.