rust/editors/code/src
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
..
ast_inspector.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
bootstrap.ts Pass server extraEnv to isValidExecutable 2023-08-12 07:10:20 +02:00
client.ts add configuration option 2023-11-07 16:33:45 +01:00
commands.ts code: expose workspaces to other extensions; remove addProject command 2023-11-16 12:38:15 -05:00
config.ts Add config for the default click action of extension status bar 2023-10-04 21:07:50 +05:30
ctx.ts code: expose workspaces to other extensions; remove addProject command 2023-11-16 12:38:15 -05:00
debug.ts Use notification command links for debugger installation 2023-07-20 15:41:08 +02:00
dependencies_provider.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
diagnostics.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
lang_client.ts detect internal error via error.code instead of error message 2023-11-15 12:36:08 +01:00
lsp_ext.ts Add command for only opening external docs and attempt to fix vscode-remote issue 2023-10-18 14:06:07 +02:00
main.ts code: expose workspaces to other extensions; remove addProject command 2023-11-16 12:38:15 -05:00
nullable.ts editor/code: Enable noUncheckedIndexedAccess ts option 2023-07-06 16:17:02 +09:00
persistent_state.ts editor/code: Sort the style to import types 2023-07-11 06:12:00 +09:00
run.ts Fix lint 2023-07-18 18:06:20 +07:00
rust_project.ts fmt 2023-03-13 13:30:19 -04:00
snippets.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
tasks.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
toolchain.ts editor/code: Re-apply code format 2023-07-13 22:44:29 +09:00
undefinable.ts editor/code: Enable noUncheckedIndexedAccess ts option 2023-07-06 16:17:02 +09:00
util.ts code: yeet rust-analyzer.discoverProjectCommand 2023-09-05 12:38:33 -04:00