biomejs / biome-intellij

Biome plugin for IntelliJ
https://plugins.jetbrains.com/plugin/22761-biome
Apache License 2.0
45 stars 12 forks source link

allow intellij project to work with different biome configs #53

Closed APshenkin closed 5 months ago

APshenkin commented 5 months ago

Hi

I really liked the speed and easy use of biome. But unfortunately without pretty support in IDE it's really hard to bring it to my company now. So I tried to solve current issues, that block.

  1. https://github.com/biomejs/biome-intellij/issues/44 The problem is that in case if file wasn't saved first, it was deleted entirely. Also I think it should be valid to use all options (applySafeFixesOnSave, applyUnsafeFixesOnSave) when Reformat with Biome is triggered, cause this is something that everyone expect.

  2. https://github.com/biomejs/biome-intellij/issues/42 This is done for Automatic setup. I didn't come up with something better, that lookup to biome config from file upwards the project root. So it will use this file as config for formatting and LSP then. LSP will restart, if editor will be focused on newfile that will have different biome config. I saw this issue in main biome https://github.com/biomejs/biome/issues/1573. But currently LSP proxy is not supporting workspaces. Also for me workspaces looks less flexible, as for example I can specify several biome conf now in one workspace (let's say for different folders for some reasons). Also as in large codebases there could be the case, that biome will be enabled not on root level, I stop LSP in cases, if there is no biome config. Otherwise it can create noise to some other projects within your workspace.

APshenkin commented 5 months ago

@ematipico curious, when this will be merged/published?

ematipico commented 5 months ago

@APshenkin, your PR was merged, and your changes should be available in version 1.1.0 of the plugin