Skip to content

Commit

Permalink
fix(editors/vscode): temporarily solve oxc_language_server issue on w…
Browse files Browse the repository at this point in the history
…indows (#6384)

closes #6382 

It seems we cannot support `oxc_language_server` by directly reusing
code from `coc-oxc`, at least not on Windows, because it requires an
`.exe` executable.

I will take some time to study the implementation of `Biome` to enhance
our vscode plugin.
  • Loading branch information
shulaoda authored Oct 9, 2024
1 parent eacde05 commit b9c94bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions editors/vscode/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ export async function activate(context: ExtensionContext) {
}

const workspaceFolders = workspace.workspaceFolders;
if (workspaceFolders) {
const isWindows = process.platform === 'win32';

if (workspaceFolders?.length && !isWindows) {
try {
return await Promise.any(
workspaceFolders.map(async (folder) => {
Expand All @@ -122,7 +124,7 @@ export async function activate(context: ExtensionContext) {
} catch {}
}

const ext = process.platform === 'win32' ? '.exe' : '';
const ext = isWindows ? '.exe' : '';
// NOTE: The `./target/release` path is aligned with the path defined in .github/workflows/release_vscode.yml
return (
process.env.SERVER_PATH_DEV ??
Expand Down

0 comments on commit b9c94bb

Please sign in to comment.