Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Mikayla Maki
314dfe0e59 v0.69.x stable 2023-01-18 12:39:21 -08:00
Antonio Scandurra
13641629ba zed 0.69.2 2023-01-16 17:50:40 +01:00
Antonio Scandurra
3bce60127f Merge pull request #2030 from zed-industries/fix-typescript-lsp
Fix error when running TypeScript language server after version 3.0.2
2023-01-16 17:50:08 +01:00
Mikayla Maki
d7efc87d94 Merge pull request #2027 from zed-industries/fix-keybindings-in-command-palette
Fix bug where keybindings would not show in command palette
2023-01-13 11:42:50 -08:00
Max Brunsfeld
69c8a3259a zed 0.69.1 2023-01-11 14:01:57 -08:00
Max Brunsfeld
96a90ea3d1 Bump protocol version after reconnect support 2023-01-11 14:01:23 -08:00
Mikayla Maki
bf7dd74584 v0.69.x preview 2023-01-11 10:33:43 -08:00
7 changed files with 18 additions and 10 deletions

2
Cargo.lock generated
View file

@ -8187,7 +8187,7 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
[[package]]
name = "zed"
version = "0.69.0"
version = "0.69.2"
dependencies = [
"activity_indicator",
"anyhow",

View file

@ -43,7 +43,7 @@ impl Keymap {
pub(crate) fn add_bindings<T: IntoIterator<Item = Binding>>(&mut self, bindings: T) {
for binding in bindings {
self.binding_indices_by_action_type
.entry(binding.action().type_id())
.entry(binding.action().as_any().type_id())
.or_default()
.push(self.bindings.len());
self.bindings.push(binding);

View file

@ -6,4 +6,4 @@ pub use conn::Connection;
pub use peer::*;
mod macros;
pub const PROTOCOL_VERSION: u32 = 44;
pub const PROTOCOL_VERSION: u32 = 45;

View file

@ -3,7 +3,7 @@ authors = ["Nathan Sobo <nathansobo@gmail.com>"]
description = "The fast, collaborative code editor."
edition = "2021"
name = "zed"
version = "0.69.0"
version = "0.69.2"
[lib]
name = "zed"

View file

@ -1 +1 @@
dev
stable

View file

@ -37,6 +37,8 @@ pub(crate) struct GithubReleaseAsset {
pub async fn npm_package_latest_version(name: &str) -> Result<String> {
let output = smol::process::Command::new("npm")
.args(["-fetch-retry-mintimeout", "2000"])
.args(["-fetch-retry-maxtimeout", "5000"])
.args(["info", name, "--json"])
.output()
.await
@ -60,6 +62,8 @@ pub async fn npm_install_packages(
directory: &Path,
) -> Result<()> {
let output = smol::process::Command::new("npm")
.args(["-fetch-retry-mintimeout", "2000"])
.args(["-fetch-retry-maxtimeout", "5000"])
.arg("install")
.arg("--prefix")
.arg(directory)

View file

@ -12,7 +12,8 @@ use util::ResultExt;
pub struct TypeScriptLspAdapter;
impl TypeScriptLspAdapter {
const BIN_PATH: &'static str = "node_modules/typescript-language-server/lib/cli.js";
const OLD_BIN_PATH: &'static str = "node_modules/typescript-language-server/lib/cli.js";
const NEW_BIN_PATH: &'static str = "node_modules/typescript-language-server/lib/cli.mjs";
}
struct Versions {
@ -57,7 +58,7 @@ impl LspAdapter for TypeScriptLspAdapter {
fs::create_dir_all(&version_dir)
.await
.context("failed to create version directory")?;
let binary_path = version_dir.join(Self::BIN_PATH);
let binary_path = version_dir.join(Self::NEW_BIN_PATH);
if fs::metadata(&binary_path).await.is_err() {
npm_install_packages(
@ -98,9 +99,12 @@ impl LspAdapter for TypeScriptLspAdapter {
}
}
let last_version_dir = last_version_dir.ok_or_else(|| anyhow!("no cached binary"))?;
let bin_path = last_version_dir.join(Self::BIN_PATH);
if bin_path.exists() {
Ok(bin_path)
let old_bin_path = last_version_dir.join(Self::OLD_BIN_PATH);
let new_bin_path = last_version_dir.join(Self::NEW_BIN_PATH);
if new_bin_path.exists() {
Ok(new_bin_path)
} else if old_bin_path.exists() {
Ok(old_bin_path)
} else {
Err(anyhow!(
"missing executable in directory {:?}",