如何从 Rust-analyzer 自动完成中隐藏关键字?

问题描述

我在 Windows 10 上的 VS Code 1.57.1​​(也是最新版本)上使用 rust-analyzer 0.2.654(最新版本)。

自动完成显示所有关键字,如下所示:

Screenshot

如何隐藏关键字,只显示实际的结构成员?

解决方法

您可以通过导航到 <Grid container style={{border: "1px solid black"}}> <Grid xs={2} style={{ alignSelf: 'center',textAlign: 'center' }} item> <img src="/img/usa_flag.svg" height="25" /> </Grid> <Grid item xs={10}> <TextField fullWidth label='Phone number' value={"lastName"} style={{ border: '0' }} InputProps={{ classes,disableUnderline: true }} /> </Grid> </Grid> 在设置 UI 中禁用此功能:

enter image description here

或者通过包含以下内容通过 Text Editor > Suggestions > Show Keywords 禁用它:

settings.json