Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jhgg committed May 24, 2022
1 parent d1aa6d3 commit b8ee992
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion editors/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,10 @@
"object"
],
"additionalProperties": {
"type": ["string", "number"]
"type": [
"string",
"number"
]
},
"default": null,
"markdownDescription": "Extra environment variables that will be passed to the rust-analyzer executable. Useful for passing e.g. `RA_LOG` for debugging."
Expand Down
7 changes: 5 additions & 2 deletions editors/code/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ export class Config {
return this.get<null | string>("server.path") ?? this.get<null | string>("serverPath");
}
get serverExtraEnv(): Env {
const extraEnv = this.get<{[key: string]: string | number} | null>("server.extraEnv") ?? {};
return Object.fromEntries(Object.entries(extraEnv).map(([k, v]) => [k, typeof v !== "string" ? v.toString(): v]));
const extraEnv =
this.get<{ [key: string]: string | number } | null>("server.extraEnv") ?? {};
return Object.fromEntries(
Object.entries(extraEnv).map(([k, v]) => [k, typeof v !== "string" ? v.toString() : v])
);
}
get traceExtension() {
return this.get<boolean>("trace.extension");
Expand Down

0 comments on commit b8ee992

Please sign in to comment.