diff options
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index c3fa788c7..347c989c4 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -22,7 +22,7 @@ export class Config { | |||
22 | "cargoFeatures", | 22 | "cargoFeatures", |
23 | "cargo-watch", | 23 | "cargo-watch", |
24 | ] | 24 | ] |
25 | .map(opt => `${Config.rootSection}.${opt}`); | 25 | .map(opt => `${Config.rootSection}.${opt}`); |
26 | 26 | ||
27 | private static readonly extensionVersion: string = (() => { | 27 | private static readonly extensionVersion: string = (() => { |
28 | const packageJsonVersion = vscode | 28 | const packageJsonVersion = vscode |
@@ -76,7 +76,7 @@ export class Config { | |||
76 | } | 76 | } |
77 | 77 | ||
78 | /** | 78 | /** |
79 | * Name of the binary artifact for `ra_lsp_server` that is published for | 79 | * Name of the binary artifact for `rust-analyzer` that is published for |
80 | * `platform` on GitHub releases. (It is also stored under the same name when | 80 | * `platform` on GitHub releases. (It is also stored under the same name when |
81 | * downloaded by the extension). | 81 | * downloaded by the extension). |
82 | */ | 82 | */ |
@@ -91,12 +91,12 @@ export class Config { | |||
91 | case "arm": | 91 | case "arm": |
92 | case "arm64": return null; | 92 | case "arm64": return null; |
93 | 93 | ||
94 | default: return "ra_lsp_server-linux"; | 94 | default: return "rust-analyzer-linux"; |
95 | } | 95 | } |
96 | } | 96 | } |
97 | 97 | ||
98 | case "darwin": return "ra_lsp_server-mac"; | 98 | case "darwin": return "rust-analyzer-mac"; |
99 | case "win32": return "ra_lsp_server-windows.exe"; | 99 | case "win32": return "rust-analyzer-windows.exe"; |
100 | 100 | ||
101 | // Users on these platforms yet need to manually build from sources | 101 | // Users on these platforms yet need to manually build from sources |
102 | case "aix": | 102 | case "aix": |
@@ -111,7 +111,7 @@ export class Config { | |||
111 | } | 111 | } |
112 | 112 | ||
113 | get serverSource(): null | BinarySource { | 113 | get serverSource(): null | BinarySource { |
114 | const serverPath = RA_LSP_DEBUG ?? this.cfg.get<null | string>("raLspServerPath"); | 114 | const serverPath = RA_LSP_DEBUG ?? this.cfg.get<null | string>("serverPath"); |
115 | 115 | ||
116 | if (serverPath) { | 116 | if (serverPath) { |
117 | return { | 117 | return { |
@@ -126,7 +126,7 @@ export class Config { | |||
126 | 126 | ||
127 | return { | 127 | return { |
128 | type: BinarySource.Type.GithubRelease, | 128 | type: BinarySource.Type.GithubRelease, |
129 | dir: this.ctx.globalStoragePath, | 129 | dir: this.ctx.globalStoragePath, |
130 | file: prebuiltBinaryName, | 130 | file: prebuiltBinaryName, |
131 | storage: this.ctx.globalState, | 131 | storage: this.ctx.globalState, |
132 | version: Config.extensionVersion, | 132 | version: Config.extensionVersion, |
@@ -140,30 +140,30 @@ export class Config { | |||
140 | // We don't do runtime config validation here for simplicity. More on stackoverflow: | 140 | // We don't do runtime config validation here for simplicity. More on stackoverflow: |
141 | // https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension | 141 | // https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension |
142 | 142 | ||
143 | get highlightingOn() { return this.cfg.get("highlightingOn") as boolean; } | 143 | get highlightingOn() { return this.cfg.get("highlightingOn") as boolean; } |
144 | get rainbowHighlightingOn() { return this.cfg.get("rainbowHighlightingOn") as boolean; } | 144 | get rainbowHighlightingOn() { return this.cfg.get("rainbowHighlightingOn") as boolean; } |
145 | get lruCapacity() { return this.cfg.get("lruCapacity") as null | number; } | 145 | get lruCapacity() { return this.cfg.get("lruCapacity") as null | number; } |
146 | get displayInlayHints() { return this.cfg.get("displayInlayHints") as boolean; } | 146 | get displayInlayHints() { return this.cfg.get("displayInlayHints") as boolean; } |
147 | get maxInlayHintLength() { return this.cfg.get("maxInlayHintLength") as number; } | 147 | get maxInlayHintLength() { return this.cfg.get("maxInlayHintLength") as number; } |
148 | get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } | 148 | get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } |
149 | get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; } | 149 | get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; } |
150 | get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; } | 150 | get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; } |
151 | get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; } | 151 | get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; } |
152 | 152 | ||
153 | get cargoWatchOptions(): CargoWatchOptions { | 153 | get cargoWatchOptions(): CargoWatchOptions { |
154 | return { | 154 | return { |
155 | enable: this.cfg.get("cargo-watch.enable") as boolean, | 155 | enable: this.cfg.get("cargo-watch.enable") as boolean, |
156 | arguments: this.cfg.get("cargo-watch.arguments") as string[], | 156 | arguments: this.cfg.get("cargo-watch.arguments") as string[], |
157 | allTargets: this.cfg.get("cargo-watch.allTargets") as boolean, | 157 | allTargets: this.cfg.get("cargo-watch.allTargets") as boolean, |
158 | command: this.cfg.get("cargo-watch.command") as string, | 158 | command: this.cfg.get("cargo-watch.command") as string, |
159 | }; | 159 | }; |
160 | } | 160 | } |
161 | 161 | ||
162 | get cargoFeatures(): CargoFeatures { | 162 | get cargoFeatures(): CargoFeatures { |
163 | return { | 163 | return { |
164 | noDefaultFeatures: this.cfg.get("cargoFeatures.noDefaultFeatures") as boolean, | 164 | noDefaultFeatures: this.cfg.get("cargoFeatures.noDefaultFeatures") as boolean, |
165 | allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, | 165 | allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, |
166 | features: this.cfg.get("cargoFeatures.features") as string[], | 166 | features: this.cfg.get("cargoFeatures.features") as string[], |
167 | }; | 167 | }; |
168 | } | 168 | } |
169 | 169 | ||