zig: Bump to v0.1.0 (#10481)
This PR bumps the Zig extension to v0.1.0. This version of the extension has been updated to use v0.0.6 of the `zed_extension_api`. It also adds support for treating `.zig.zon` files as Zig files (#10012). Release Notes: - N/A
This commit is contained in:
parent
65c9e7d3d1
commit
e0e1103228
4 changed files with 11 additions and 10 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -12696,9 +12696,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zed_zig"
|
name = "zed_zig"
|
||||||
version = "0.0.1"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"zed_extension_api 0.0.5",
|
"zed_extension_api 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "zed_zig"
|
name = "zed_zig"
|
||||||
version = "0.0.1"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
@ -13,4 +13,4 @@ path = "src/zig.rs"
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
zed_extension_api = "0.0.5"
|
zed_extension_api = "0.0.6"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
id = "zig"
|
id = "zig"
|
||||||
name = "Zig"
|
name = "Zig"
|
||||||
description = "Zig support."
|
description = "Zig support."
|
||||||
version = "0.0.1"
|
version = "0.1.0"
|
||||||
schema_version = 1
|
schema_version = 1
|
||||||
authors = ["Allan Calix <contact@acx.dev>"]
|
authors = ["Allan Calix <contact@acx.dev>"]
|
||||||
repository = "https://github.com/zed-industries/zed"
|
repository = "https://github.com/zed-industries/zed"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
use zed::LanguageServerId;
|
||||||
use zed_extension_api::{self as zed, Result};
|
use zed_extension_api::{self as zed, Result};
|
||||||
|
|
||||||
struct ZigExtension {
|
struct ZigExtension {
|
||||||
|
@ -8,7 +9,7 @@ struct ZigExtension {
|
||||||
impl ZigExtension {
|
impl ZigExtension {
|
||||||
fn language_server_binary_path(
|
fn language_server_binary_path(
|
||||||
&mut self,
|
&mut self,
|
||||||
config: zed::LanguageServerConfig,
|
language_server_id: &LanguageServerId,
|
||||||
worktree: &zed::Worktree,
|
worktree: &zed::Worktree,
|
||||||
) -> Result<String> {
|
) -> Result<String> {
|
||||||
if let Some(path) = &self.cached_binary_path {
|
if let Some(path) = &self.cached_binary_path {
|
||||||
|
@ -23,7 +24,7 @@ impl ZigExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
zed::set_language_server_installation_status(
|
zed::set_language_server_installation_status(
|
||||||
&config.name,
|
&language_server_id,
|
||||||
&zed::LanguageServerInstallationStatus::CheckingForUpdate,
|
&zed::LanguageServerInstallationStatus::CheckingForUpdate,
|
||||||
);
|
);
|
||||||
let release = zed::latest_github_release(
|
let release = zed::latest_github_release(
|
||||||
|
@ -64,7 +65,7 @@ impl ZigExtension {
|
||||||
|
|
||||||
if !fs::metadata(&binary_path).map_or(false, |stat| stat.is_file()) {
|
if !fs::metadata(&binary_path).map_or(false, |stat| stat.is_file()) {
|
||||||
zed::set_language_server_installation_status(
|
zed::set_language_server_installation_status(
|
||||||
&config.name,
|
&language_server_id,
|
||||||
&zed::LanguageServerInstallationStatus::Downloading,
|
&zed::LanguageServerInstallationStatus::Downloading,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -104,11 +105,11 @@ impl zed::Extension for ZigExtension {
|
||||||
|
|
||||||
fn language_server_command(
|
fn language_server_command(
|
||||||
&mut self,
|
&mut self,
|
||||||
config: zed::LanguageServerConfig,
|
language_server_id: &LanguageServerId,
|
||||||
worktree: &zed::Worktree,
|
worktree: &zed::Worktree,
|
||||||
) -> Result<zed::Command> {
|
) -> Result<zed::Command> {
|
||||||
Ok(zed::Command {
|
Ok(zed::Command {
|
||||||
command: self.language_server_binary_path(config, worktree)?,
|
command: self.language_server_binary_path(language_server_id, worktree)?,
|
||||||
args: vec![],
|
args: vec![],
|
||||||
env: Default::default(),
|
env: Default::default(),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue