biomejs / biome-vscode

Biome extension for Visual Studio Code and VSCodium
https://marketplace.visualstudio.com/items?itemName=biomejs.biome
Apache License 2.0
231 stars 31 forks source link

πŸ› Allow workspace-relative paths for `biome.lsp.bin` #420

Open cr7pt0gr4ph7 opened 5 days ago

cr7pt0gr4ph7 commented 5 days ago

VS Code version

1.93.1

Extension version

2024.10.131712

Biome version

1.9.4

Operating system

Description

The old biome.lspBin setting in 2.3.x supported workspace-relative paths, while Biome 3.x (both for the new biome.lsp.bin setting and for the old biome.lspBin setting) only supports absolute paths.

Steps to reproduce

// <workspace>/.vscode/settings.json
{
  "biome.lsp.bin": "app/node_modules/.bin/biome"
}
// <workspace>/app/package.json
{
  "devDependencies": {
    "@biomejs/biome": "1.9.4"
  },
  "type": "module"
}

Expected behavior

There should be a package-manager-independent way to reference a workspace-relative biome installation, either by supporting relative paths like app/node_modules/.bin/biome (as it was implemented in 2.x) or by allowing the use of placeholders as in ${workspaceFolder}/app/node_modules/.bin/biome.

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Link to a minimal reproduction

No response

Logs

2024-11-07 15:11:12.984 [info] 
...
2024-11-07 15:11:12.984 [info] Biome extension 2024.10.131712 activated
2024-11-07 15:11:16.690 [error] Could not find the Biome binary
nhedger commented 5 days ago

Thanks for opening this issue, I agree with you.

I'd accept a PR for this if you're up to the challenge, otherwise, we'll somehow get it done before releasing the stable version.