rust/editors/code
bors fec3828c5f Auto merge of #15846 - jprochazk:disable-error-notification, r=Veykril
editor/code: add option to suppress error notifications

Fixes https://github.com/rust-lang/rust-analyzer/issues/14193

- Added the `rust-analyzer.showRequestFailedErrorNotification` configuration option, which defaults to `true`
- If `rust-analyzer.showRequestFailedErrorNotification` is set to `true`, the current behavior is preserved.
- If `rust-analyzer.showRequestFailedErrorNotification` is set to `false`, no error toasts will be displayed for any of the failed requests caused by panics in r-a. This _only_ applies to events that are triggered "implicitly", such as `textDocument/hover`.

To test this, you can manually introduce a panic in one of the language server LSP handlers for non-command events. I added an explicit `panic!()` in the `textDocument/hover` event handler:

#### `rust-analyzer.showRequestFailedErrorNotification` set to `true` (default)

[2023-11-07 17-17-48.webm](https://github.com/rust-lang/rust-analyzer/assets/1665677/d0408ab8-79d1-42cf-a4e7-94e99d9783ec)

#### `rust-analyzer.showRequestFailedErrorNotification` set to `false`

[2023-11-07 17-16-49.webm](https://github.com/rust-lang/rust-analyzer/assets/1665677/0496d8d0-fb53-4bc6-a279-1a47f412dbdb)
2023-11-24 14:06:07 +00:00
..
src Auto merge of #15846 - jprochazk:disable-error-notification, r=Veykril 2023-11-24 14:06:07 +00:00
tests editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
.eslintignore
.eslintrc.js editor/code: Update typescript-eslint to v6 2023-07-13 22:44:29 +09:00
.gitignore Add experimental VSCode api 2022-03-04 07:45:51 +02:00
.prettierignore prettier config 2022-05-17 18:12:49 +01:00
.prettierrc.js prettier config 2022-05-17 18:12:49 +01:00
.vscodeignore Remove markdown injection 2023-06-23 11:31:10 +02:00
icon.png
language-configuration.json feat: add backtick to surrounding and auto-closing pairs 2023-09-26 06:36:37 +00:00
LICENSE Add LICENSE file to make vsce happy 2021-12-04 12:29:27 +02:00
package-lock.json editor/code: bump minimum version of VS Code to 1.78 2023-11-15 10:32:40 -05:00
package.json Auto merge of #15846 - jprochazk:disable-error-notification, r=Veykril 2023-11-24 14:06:07 +00:00
ra_syntax_tree.tmGrammar.json prettier run 2022-05-17 18:15:06 +01:00
README.md Improve extension description and README 2022-05-13 18:15:33 +02:00
tsconfig.eslint.json prettier run 2022-05-17 18:15:06 +01:00
tsconfig.json Tweak tsconfig.json 2023-11-15 17:08:39 +02:00

rust-analyzer

This extension provides support for the Rust programming language. It is recommended over and replaces rust-lang.rust.

Features

Quick start

  1. Install rustup.
  2. Install the rust-analyzer extension.

Configuration

This extension provides configurations through VSCode's configuration settings. All configurations are under rust-analyzer.*.

See the manual for more information on VSCode specific configurations.

Communication

For usage and troubleshooting requests, please use the "IDEs and Editors" category of the Rust forum.

Documentation

See rust-analyzer.github.io for more information.