diff options
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 501997fef..1f45f1de0 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -11,9 +11,8 @@ export class Config { | |||
11 | private readonly rootSection = "rust-analyzer"; | 11 | private readonly rootSection = "rust-analyzer"; |
12 | private readonly requiresReloadOpts = [ | 12 | private readonly requiresReloadOpts = [ |
13 | "serverPath", | 13 | "serverPath", |
14 | "cargoFeatures", | 14 | "cargo", |
15 | "excludeGlobs", | 15 | "files", |
16 | "useClientWatching", | ||
17 | "highlighting", | 16 | "highlighting", |
18 | "updates.channel", | 17 | "updates.channel", |
19 | ] | 18 | ] |
@@ -71,19 +70,8 @@ export class Config { | |||
71 | get channel() { return this.cfg.get<UpdatesChannel>("updates.channel")!; } | 70 | get channel() { return this.cfg.get<UpdatesChannel>("updates.channel")!; } |
72 | get askBeforeDownload() { return this.cfg.get<boolean>("updates.askBeforeDownload")!; } | 71 | get askBeforeDownload() { return this.cfg.get<boolean>("updates.askBeforeDownload")!; } |
73 | get highlightingSemanticTokens() { return this.cfg.get<boolean>("highlighting.semanticTokens")!; } | 72 | get highlightingSemanticTokens() { return this.cfg.get<boolean>("highlighting.semanticTokens")!; } |
74 | get highlightingOn() { return this.cfg.get<boolean>("highlightingOn")!; } | ||
75 | get rainbowHighlightingOn() { return this.cfg.get<boolean>("rainbowHighlightingOn")!; } | ||
76 | get lruCapacity() { return this.cfg.get<null | number>("lruCapacity")!; } | ||
77 | get excludeGlobs() { return this.cfg.get<string[]>("excludeGlobs")!; } | ||
78 | get useClientWatching() { return this.cfg.get<boolean>("useClientWatching")!; } | ||
79 | get featureFlags() { return this.cfg.get<Record<string, boolean>>("featureFlags")!; } | ||
80 | get rustfmtArgs() { return this.cfg.get<string[]>("rustfmtArgs")!; } | ||
81 | get loadOutDirsFromCheck() { return this.cfg.get<boolean>("loadOutDirsFromCheck")!; } | ||
82 | get traceExtension() { return this.cfg.get<boolean>("trace.extension")!; } | 73 | get traceExtension() { return this.cfg.get<boolean>("trace.extension")!; } |
83 | 74 | ||
84 | // for internal use | ||
85 | get withSysroot() { return this.cfg.get<boolean>("withSysroot", true)!; } | ||
86 | |||
87 | get inlayHints() { | 75 | get inlayHints() { |
88 | return { | 76 | return { |
89 | typeHints: this.cfg.get<boolean>("inlayHints.typeHints")!, | 77 | typeHints: this.cfg.get<boolean>("inlayHints.typeHints")!, |
@@ -93,21 +81,9 @@ export class Config { | |||
93 | }; | 81 | }; |
94 | } | 82 | } |
95 | 83 | ||
96 | get cargoWatchOptions() { | 84 | get checkOnSave() { |
97 | return { | ||
98 | enable: this.cfg.get<boolean>("cargo-watch.enable")!, | ||
99 | arguments: this.cfg.get<string[]>("cargo-watch.arguments")!, | ||
100 | allTargets: this.cfg.get<boolean>("cargo-watch.allTargets")!, | ||
101 | command: this.cfg.get<string>("cargo-watch.command")!, | ||
102 | }; | ||
103 | } | ||
104 | |||
105 | get cargoFeatures() { | ||
106 | return { | 85 | return { |
107 | noDefaultFeatures: this.cfg.get<boolean>("cargoFeatures.noDefaultFeatures")!, | 86 | command: this.cfg.get<string>("checkOnSave.command")!, |
108 | allFeatures: this.cfg.get<boolean>("cargoFeatures.allFeatures")!, | ||
109 | features: this.cfg.get<string[]>("cargoFeatures.features")!, | ||
110 | loadOutDirsFromCheck: this.cfg.get<boolean>("cargoFeatures.loadOutDirsFromCheck")!, | ||
111 | }; | 87 | }; |
112 | } | 88 | } |
113 | } | 89 | } |