For VS Code, I use rust-analyzer
to handle syntax highlighting and flychecking.
How do I remove the inlay type and parameter annotations in grey below?
For VS Code, I use rust-analyzer
to handle syntax highlighting and flychecking.
How do I remove the inlay type and parameter annotations in grey below?
Update Sept 2022.
They now use VSCode builtin inlay function from 1.67
I setup mine as follow:
{
"editor.inlayHints.enabled": "offUnlessPressed"
}
Then you can toggle them with Ctrl+Alt pressed.
Old Answer
There is now a togglable command (Ctrl+Shift+P) : Rust Analyzer: Toggle inlay hints
New Answer for VS Code: https://stackoverflow.com/a/72338341/9363973
Old answer:
In Visual Studio Code you can easily do this.
If you're not using Visual Studio Code you'll need to manually edit the JSON config file of rust-analyzer (helpful link to the documentation). Basically
{
"inlayHints": {
"typeHints": false,
"parameterHints": false
},
// further configuration
}