diff options
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 2 | ||||
-rw-r--r-- | editors/code/src/main.ts | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index ea7f0990c..3e6ebd7ed 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -349,7 +349,7 @@ | |||
349 | "default": {}, | 349 | "default": {}, |
350 | "markdownDescription": "Optional settings passed to the debug engine. Example: `{ \"lldb\": { \"terminal\":\"external\"} }`" | 350 | "markdownDescription": "Optional settings passed to the debug engine. Example: `{ \"lldb\": { \"terminal\":\"external\"} }`" |
351 | }, | 351 | }, |
352 | "rust-analyzer.assist.importMergeBehaviour": { | 352 | "rust-analyzer.assist.importMergeBehavior": { |
353 | "markdownDescription": "The strategy to use when inserting new imports or merging imports.", | 353 | "markdownDescription": "The strategy to use when inserting new imports or merging imports.", |
354 | "default": "full", | 354 | "default": "full", |
355 | "type": "string", | 355 | "type": "string", |
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 4c132cabe..1edb7713d 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts | |||
@@ -167,6 +167,7 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi | |||
167 | } | 167 | } |
168 | return; | 168 | return; |
169 | }; | 169 | }; |
170 | if (serverPath(config)) return; | ||
170 | 171 | ||
171 | const now = Date.now(); | 172 | const now = Date.now(); |
172 | if (config.package.releaseTag === NIGHTLY_TAG) { | 173 | if (config.package.releaseTag === NIGHTLY_TAG) { |
@@ -278,7 +279,7 @@ async function patchelf(dest: PathLike): Promise<void> { | |||
278 | } | 279 | } |
279 | 280 | ||
280 | async function getServer(config: Config, state: PersistentState): Promise<string | undefined> { | 281 | async function getServer(config: Config, state: PersistentState): Promise<string | undefined> { |
281 | const explicitPath = process.env.__RA_LSP_SERVER_DEBUG ?? config.serverPath; | 282 | const explicitPath = serverPath(config); |
282 | if (explicitPath) { | 283 | if (explicitPath) { |
283 | if (explicitPath.startsWith("~/")) { | 284 | if (explicitPath.startsWith("~/")) { |
284 | return os.homedir() + explicitPath.slice("~".length); | 285 | return os.homedir() + explicitPath.slice("~".length); |
@@ -293,6 +294,7 @@ async function getServer(config: Config, state: PersistentState): Promise<string | |||
293 | "x64 linux": "x86_64-unknown-linux-gnu", | 294 | "x64 linux": "x86_64-unknown-linux-gnu", |
294 | "x64 darwin": "x86_64-apple-darwin", | 295 | "x64 darwin": "x86_64-apple-darwin", |
295 | "arm64 win32": "aarch64-pc-windows-msvc", | 296 | "arm64 win32": "aarch64-pc-windows-msvc", |
297 | "arm64 linux": "aarch64-unknown-linux-gnu", | ||
296 | "arm64 darwin": "aarch64-apple-darwin", | 298 | "arm64 darwin": "aarch64-apple-darwin", |
297 | }; | 299 | }; |
298 | const platform = platforms[`${process.arch} ${process.platform}`]; | 300 | const platform = platforms[`${process.arch} ${process.platform}`]; |
@@ -351,6 +353,10 @@ async function getServer(config: Config, state: PersistentState): Promise<string | |||
351 | return dest; | 353 | return dest; |
352 | } | 354 | } |
353 | 355 | ||
356 | function serverPath(config: Config): string | null { | ||
357 | return process.env.__RA_LSP_SERVER_DEBUG ?? config.serverPath; | ||
358 | } | ||
359 | |||
354 | async function isNixOs(): Promise<boolean> { | 360 | async function isNixOs(): Promise<boolean> { |
355 | try { | 361 | try { |
356 | const contents = await fs.readFile("/etc/os-release"); | 362 | const contents = await fs.readFile("/etc/os-release"); |