Coder Social home page Coder Social logo

Comments (5)

smikitky avatar smikitky commented on May 29, 2024 4

@ematipico I made a PR, hope it helps.

from biome.

ematipico avatar ematipico commented on May 29, 2024 3

Our LSP doesn't support workspaces yet. We have a task to implement and support them: #1573

from biome.

jonasfroeller avatar jonasfroeller commented on May 29, 2024

Environment information

CLI:
  Version:                      1.5.2
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v21.1.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/8.10.2"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

I have several "Folders" in my VS Code "Workspace". Like this:

image

Some of those "Folders" are projects that use Biome, and some aren't. Biome's VS Code extension doesn't handle this very gracefully. There are several issues:

Bug 1: First "Folder" in the VS Code "Workspace" must be a Biome project for any others to work

If you order the "Folders" in your "Workspace" such that the top-most one doesn't have Biome installed, none of the files you open in the older "Folders" will run through Biome checks. It seems like the top-most "Folder" must be a Biome project for the Biome VS Code extension to do anything and will instead show this warning:

image

Bug 2: Biome runs on "Folders" that aren't Biome projects

The inverse of Bug 1 also exists, where if the top-most "Folder" is a Biome project, all other "Folders" will get checked by Biome, even if they don't have Biome installed or configured.

Bug 3: Duplicated problems

For every folder with Biome installed, the "Problems" tab shows duplicate Biome errors:

image

Note how each of those problems is the same problem on the same line & column. It's a duplicate.

Expected result

Expectations listed above in each bug

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Thank you for opening the issue, I had the same problem.

from biome.

smikitky avatar smikitky commented on May 29, 2024

Hi, for the time being, could you describe this limitation in https://biomejs.dev/reference/vscode/ (under "Troubleshooting")?

I wasted an hour trying to get my biome.json working in a multi-root workspace where only one root uses Biome (other roots still depend on Prettier). I managed to enable formatting with Biome on save, but biome.json seems to be ignored by the extension (it works just fine when I manually type npx biome format).

Am I right that it's simply impossible to do this for now, and all I can do is set up isolated VSCode workspaces for each my Biome-enabled folder?

from biome.

ematipico avatar ematipico commented on May 29, 2024

Hi, for the time being, could you describe this limitation in biomejs.dev/reference/vscode (under "Troubleshooting")?

I wasted an hour trying to get my biome.json working in a multi-root workspace where only one root uses Biome (other roots still depend on Prettier). I managed to enable formatting with Biome on save, but biome.json seems to be ignored by the extension (it works just fine when I manually type npx biome format).

Am I right that it's simply impossible to do this for now, and all I can do is set up isolated VSCode workspaces for each my Biome-enabled folder?

Apologies, @smikitky, for the time you wasted. Would you like to send a PR yourself?

from biome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.