mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
fec3828c5f
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) |
||
---|---|---|
.. | ||
src | ||
tests | ||
.eslintignore | ||
.eslintrc.js | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.js | ||
.vscodeignore | ||
icon.png | ||
language-configuration.json | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
ra_syntax_tree.tmGrammar.json | ||
README.md | ||
tsconfig.eslint.json | ||
tsconfig.json |
rust-analyzer
This extension provides support for the Rust programming language.
It is recommended over and replaces rust-lang.rust
.
Features
- code completion with imports insertion
- go to definition, implementation, type definition
- find all references, workspace symbol search, symbol renaming
- types and documentation on hover
- inlay hints for types and parameter names
- semantic syntax highlighting
- a lot of assists (code actions)
- apply suggestions from errors
- ... and many more, check out the manual to see them all
Quick start
- Install rustup.
- 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.