mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Remove old inlay hints settings
This commit is contained in:
parent
7ce3ca5aab
commit
f77adb3a23
3 changed files with 8 additions and 21 deletions
|
@ -722,7 +722,7 @@ Just add this to your `settings.json`:
|
||||||
{
|
{
|
||||||
"editor.inlayHints.fontFamily": "Courier New",
|
"editor.inlayHints.fontFamily": "Courier New",
|
||||||
"editor.inlayHints.fontSize": 11,
|
"editor.inlayHints.fontSize": 11,
|
||||||
|
|
||||||
"workbench.colorCustomizations": {
|
"workbench.colorCustomizations": {
|
||||||
// Name of the theme you are currently using
|
// Name of the theme you are currently using
|
||||||
"[Default Dark+]": {
|
"[Default Dark+]": {
|
||||||
|
@ -797,8 +797,8 @@ For example:
|
||||||
[source,json]
|
[source,json]
|
||||||
----
|
----
|
||||||
{
|
{
|
||||||
"key": "ctrl+i",
|
"key": "ctrl+alt+d",
|
||||||
"command": "rust-analyzer.toggleInlayHints",
|
"command": "rust-analyzer.openDocs",
|
||||||
"when": "inRustProject"
|
"when": "inRustProject"
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
|
@ -298,12 +298,12 @@ export function serverVersion(ctx: Ctx): Cmd {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function toggleInlayHints(ctx: Ctx): Cmd {
|
export function toggleInlayHints(_ctx: Ctx): Cmd {
|
||||||
return async () => {
|
return async () => {
|
||||||
await vscode
|
const scope = vscode.ConfigurationTarget.Global;
|
||||||
.workspace
|
const config = vscode.workspace.getConfiguration("editor.inlayHints");
|
||||||
.getConfiguration(`${ctx.config.rootSection}.inlayHints`)
|
const value = !config.get("enabled");
|
||||||
.update('enable', !ctx.config.inlayHints.enable, vscode.ConfigurationTarget.Global);
|
await config.update('enabled', value, scope);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,19 +97,6 @@ export class Config {
|
||||||
get serverExtraEnv() { return this.get<Env | null>("server.extraEnv") ?? {}; }
|
get serverExtraEnv() { return this.get<Env | null>("server.extraEnv") ?? {}; }
|
||||||
get traceExtension() { return this.get<boolean>("trace.extension"); }
|
get traceExtension() { return this.get<boolean>("trace.extension"); }
|
||||||
|
|
||||||
get inlayHints() {
|
|
||||||
return {
|
|
||||||
enable: this.get<boolean>("inlayHints.enable"),
|
|
||||||
typeHints: this.get<boolean>("inlayHints.typeHints"),
|
|
||||||
parameterHints: this.get<boolean>("inlayHints.parameterHints"),
|
|
||||||
chainingHints: this.get<boolean>("inlayHints.chainingHints"),
|
|
||||||
closureReturnTypeHints: this.get<boolean>("inlayHints.closureReturnTypeHints"),
|
|
||||||
hideNamedConstructorHints: this.get<boolean>("inlayHints.hideNamedConstructorHints"),
|
|
||||||
smallerHints: this.get<boolean>("inlayHints.smallerHints"),
|
|
||||||
maxLength: this.get<null | number>("inlayHints.maxLength"),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
get cargoRunner() {
|
get cargoRunner() {
|
||||||
return this.get<string | undefined>("cargoRunner");
|
return this.get<string | undefined>("cargoRunner");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue