biomejs / biome-vscode

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

V3 #201

Closed nhedger closed 1 week ago

nhedger commented 4 months ago

Summary

This issue tracks the progress of the extension's v3, a full rewrite that will introduce new exciting features such as support for multiple workspace folders and provide fixes for some longstanding issues.

New stuff

This section lists some of the new features we will introduce in v3.

Support for multiple workspace folders

There's not a week that goes by without someone asking about supporting multiple workspace folders, and we've heard you loud and clear. Version 3 will introduce multiple workspace folder support by spawning independent Biome instances for each.

Quality of life improvements

Automatic LSP reloading

We plan to introduce a new system capable of reloading or recreating LSP sessions as the configuration changes or as Biome is updated.

No more reloading the VS Code window manually.

Issues

This section lists some of the longstanding issues that the current version of the extension suffers and describes how we plan to solve each.

Notification about Biome missing

As reported in https://github.com/biomejs/biome-vscode/issues/74, and https://github.com/biomejs/biome-vscode/discussions/72, the extension warns the user that it cannot find Biome in the project's dependencies, even in projects that don't actively use Biome. This annoyance has been reported multiple times on GitHub and Discord and should be addressed.

As witnessed, it can be challenging to satisfy everyone's needs by providing only a default way of doing this, and this issue is the ideal candidate for introducing new options that give the user more control over how and when the extension is enabled.

I'm not dead set on the names yet, but the idea is to introduce the following configuration options, hopefully addressing this issue.

  1. biome.enabled, which acts as a boolean switch that allows the user to enable or disable the Biome extension entirely. One of the benefits of this option is that contrary to VS Code's built-in disable feature, it can be specified at the workspace level and persisted in the code.
  2. biome.requireConfigurationFile, which allows the user to decide whether the extension should be enabled only if a biome.json configuration file is present in the project.

Help users troubleshooting

We have seen an increase in bug reports and issues on this repository, which is very positive because it shows that our users care about the extension.

However, troubleshooting issues with the extension can be a long and tedious process. I feel that we should provide more tools to help users provide information.

Here are some ideas:

ematipico commented 4 months ago

About the troubleshooting part, I suggested the rage command here: https://github.com/biomejs/biome-vscode/discussions/170

The LSP is already ready to send the information (and we can extend it to collect logs too)

The client just needs to send the request

nhedger commented 4 months ago

About the troubleshooting part, I suggested the rage command here: #170

The LSP is already ready to send the information (and we can extend it to collect logs too)

The client just needs to send the request

Sounds perfect !

glhrmv commented 3 months ago

I was just about to create a new issue to complain about the "Biome missing from dependencies" issue but thankfully I found this stickied first. From the PR description, it looks like none of the "Activation strategies" have been implemented. Do you need help with this? Should people submit PRs to target that feature branch?

nhedger commented 3 months ago

Thanks for asking, @glhrmv.

I'm not ready to accept contributions yet; I'm still ironing things out.

raix commented 1 month ago

@nhedger looking forwards to this update, let us know if there's anything we can do to help out ❤️

afonsojramos commented 1 month ago

Has this project considered using https://github.com/volarjs/volar.js? Feedback from other LSP maintainers seems to be very positive, so it might be worth considering.

ematipico commented 1 month ago

Has this project considered using https://github.com/volarjs/volar.js? Feedback from other LSP maintainers seems to be very positive, so it might be worth considering.

@afonsojramos I did and it's not worth it, mostly because Volar is meant mostly for creating a LSP server, however we already have it provided by biome binary.

One case that I foresee is the support of the extension in the browsers, but that's not in our roadmap unless someone really wants to

geongeorge commented 1 month ago

@nhedger Thank you for this. The only thing that keeps us from switching to Biome on our projects is workspace support. We have an open pr in our repo to switch to biome. But the project is a Monorepo and contains multiple biome.json files. Wondering if there is a pre-release version where we can test this out.

nhedger commented 1 month ago

@nhedger Thank you for this. The only thing that keeps us from switching to Biome on our projects is workspace support. We have an open pr in our repo to switch to biome. But the project is a Monorepo and contains multiple biome.json files. Wondering if there is a pre-release version where we can test this out.

Thanks for showing interest, there isn't a preview version yet, unfortunately.