export class Config {
readonly extensionId = "matklad.rust-analyzer";
- private readonly rootSection = "rust-analyzer";
+ readonly rootSection = "rust-analyzer";
private readonly requiresReloadOpts = [
"serverPath",
"cargo",
"files",
"highlighting",
"updates.channel",
+ "lens.enable",
+ "lens.run",
+ "lens.debug",
+ "lens.implementations",
]
.map(opt => `${this.rootSection}.${opt}`);
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"),
}
get debug() {
+ // "/rustc/<id>" used by suggestions only.
+ const { ["/rustc/<id>"]: _, ...sourceFileMap } = this.get<Record<string, string>>("debug.sourceFileMap");
+
return {
engine: this.get<string>("debug.engine"),
- sourceFileMap: this.get<Record<string, string>>("debug.sourceFileMap"),
+ engineSettings: this.get<object>("debug.engineSettings"),
+ openUpDebugPane: this.get<boolean>("debug.openUpDebugPane"),
+ sourceFileMap: sourceFileMap
};
}
+ get lens() {
+ return {
+ enable: this.get<boolean>("lens.enable"),
+ run: this.get<boolean>("lens.run"),
+ debug: this.get<boolean>("lens.debug"),
+ implementations: this.get<boolean>("lens.implementations"),
+ };
+ }
}