How to hide keywords from rust-analyzer autocomplete?

Viewed 236

I'm using rust-analyzer 0.2.654 (latest) on VS Code 1.57.1 (also latest) on Windows 10.

The autocomplete displays all keywords, as shown below:

Screenshot

How can I hide the keywords, displaying only the actual struct members?

2 Answers

You can disable this in the settings UI by navigating to Text Editor > Suggestions > Show Keywords:

enter image description here

Or alternatively disable it via settings.json by including:

"editor.suggest.showKeywords": false,

You also need to disable "Postfix completions" otherwise you get a load of completions like dbg, match and so on which are really automatic snippets rather than actual struct members.

postfix completions

Related