Skip to content

Commit 7ed58ff

Browse files
authored
feat!: remove compatibility for Biome v1 (#102)
* feat!: remove compatibility for Biome v1 BREAKING-CHANGE: Using the extension with Biome v1 is no longer supported. Please upgrade to Biome v2, or use older version of the extension. * chore: bump version, add note to readme
1 parent 49fe0e4 commit 7ed58ff

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ Requires Zed >= **v0.131.0**.
3737

3838
This extension is available in the extensions view inside the Zed editor. Open `zed: extensions` and search for _Biome_.
3939

40+
> [!NOTE]
41+
> Since v0.2.0, this extension is only compatible with Biome v2.
42+
> To use with Biome v1.x, please use v0.1.5, the last release of v0.1.x.
43+
4044
## Documentation
4145

4246
Head to the [official documentation](https://biomejs.dev/reference/zed) to learn how to set up the extension, and customize it.

extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ id = "biome"
44
name = "Biome"
55
repository = "https://github.com/biomejs/biome-zed"
66
schema_version = 1
7-
version = "0.1.5"
7+
version = "0.2.0"
88

99
[language_servers.biome]
1010
code_action_kinds = ["quickfix"]

src/biome.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,6 @@ impl BiomeExtension {
121121
.and_then(|value| value.as_bool())
122122
.unwrap_or(false)
123123
}
124-
125-
fn is_biome_v1(&self) -> bool {
126-
zed::npm_package_installed_version(PACKAGE_NAME)
127-
.ok()
128-
.flatten()
129-
.is_some_and(|version| version.starts_with("1."))
130-
}
131124
}
132125

133126
impl zed::Extension for BiomeExtension {
@@ -144,17 +137,6 @@ impl zed::Extension for BiomeExtension {
144137

145138
let mut args = vec!["lsp-proxy".to_string()];
146139

147-
// evaluate lsp settings for v1 compatibility
148-
if self.is_biome_v1() {
149-
if let Some(settings) = settings.settings {
150-
if let Some(config_path) = self.config_path(worktree, &settings) {
151-
args.append(&mut vec!["--config-path".to_string(), config_path.clone()]);
152-
} else if self.require_config_file(&settings) {
153-
return Err("biome.json is not found but require_config_file is true".to_string());
154-
}
155-
}
156-
}
157-
158140
// check and run biome with custom binary
159141
if let Some(binary) = settings.binary {
160142
return Ok(zed::Command {

0 commit comments

Comments
 (0)