Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Windows 10 上的 VS Code 1.57.1(也是最新的)上使用 rust-analyzer 0.2.654(最新)。
自动完成显示所有关键字,如下图:
如何隐藏关键字,只显示实际的结构成员?
您可以通过导航到以下设置在设置 UI 中禁用此功能Text Editor > Suggestions > Show Keywords:
Text Editor > Suggestions > Show Keywords
或者settings.json通过包括以下方式禁用它:
settings.json
"editor.suggest.showKeywords": false,
您还需要禁用“后缀完成”,否则您会得到大量的完成,例如dbg,match等等,它们实际上是自动片段而不是实际的结构成员。
dbg
match