Compare commits

...

10 Commits

Author SHA1 Message Date
Zed Bot
cfe5dd8d04 Bump to 0.153.3 for @ConradIrwin 2024-09-13 13:03:13 -07:00
gcp-cherry-pick-bot[bot]
c58a552161 project: Use login shell to get environment per project (cherry-pick #17717) (#17720)
Cherry-picked project: Use login shell to get environment per project
(#17717)

This is a follow-up to #17075 to spawn a login shell when getting the
environment for projects.

The reason why we didn't do it before is that we only used the
environment for certain language servers and not a lot of other things,
like tasks.

But with #17075 we now use the project more often and use it as the
_base_ environment for tasks/terminals.

Before the change, terminals and tasks would inherit the Zed process'
environment, including PATH and so on. After the change, we would set
the environment, overwriting the PATH instead of merging. But the
non-login shell environment is a subset of the login-shell environment.


Release Notes:

- Fixed environment variables used per project in terminals/tasks
overwriting the base environment and not making use of a login-shell
environment.

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-09-12 14:46:31 -04:00
Joseph T Lyons
efe773a796 zed 0.153.2 2024-09-12 10:00:43 -04:00
gcp-cherry-pick-bot[bot]
4c81907cc2 Use a bigger prefix for numeric sorting (cherry-pick #17752) (#17754)
Cherry-picked Use a bigger prefix for numeric sorting (#17752)

Release Notes:

- Fixed sorting of files with YYYYmmddHHMMSS prefix

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-09-12 09:42:50 -04:00
gcp-cherry-pick-bot[bot]
5880b24c79 bump eslint memory usage (cherry-pick #17724) (#17731)
Cherry-picked bump eslint memory usage (#17724)

Release Notes:

- Increased memory limit for eslint to reduce crashes

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-09-11 17:23:40 -04:00
Peter Tripp
576b38d598 zed 0.153.1 2024-09-10 17:52:25 -04:00
Piotr Osiewicz
7e4bc1235a pane: Fix pinned tabs being persisted after closing (#17666)
Release Notes:

- Fixed tabs staying pinned after closing unrelated tabs
2024-09-10 17:51:21 -04:00
Peter Tripp
39f57fa538 Revert tokenizer for custom OpenAI models (#17660)
Fix for custom openai models tokenizer settings.
2024-09-10 17:51:17 -04:00
Conrad Irwin
7058a91b82 Correctly merge settings for vtsls (#17657)
Release Notes:

- Fixed vtsls initialization_options in project settings files
2024-09-10 17:51:12 -04:00
Joseph T Lyons
f9ec8405c5 v0.153.x preview 2024-09-10 14:40:26 -04:00
9 changed files with 38 additions and 15 deletions

2
Cargo.lock generated
View File

@@ -14197,7 +14197,7 @@ dependencies = [
[[package]]
name = "zed"
version = "0.153.0"
version = "0.153.3"
dependencies = [
"activity_indicator",
"anyhow",

View File

@@ -370,7 +370,11 @@ pub fn count_open_ai_tokens(
})
.collect::<Vec<_>>();
tiktoken_rs::num_tokens_from_messages(model.id(), &messages)
if let open_ai::Model::Custom { .. } = model {
tiktoken_rs::num_tokens_from_messages("gpt-4", &messages)
} else {
tiktoken_rs::num_tokens_from_messages(model.id(), &messages)
}
})
.boxed()
}

View File

@@ -58,7 +58,11 @@ fn typescript_server_binary_arguments(server_path: &Path) -> Vec<OsString> {
}
fn eslint_server_binary_arguments(server_path: &Path) -> Vec<OsString> {
vec![server_path.into(), "--stdio".into()]
vec![
"--max-old-space-size=8192".into(),
server_path.into(),
"--stdio".into(),
]
}
pub struct TypeScriptLspAdapter {

View File

@@ -7,14 +7,14 @@ use lsp::{CodeActionKind, LanguageServerBinary};
use node_runtime::NodeRuntime;
use project::project_settings::{BinarySettings, ProjectSettings};
use serde_json::{json, Value};
use settings::Settings;
use settings::{Settings, SettingsLocation};
use std::{
any::Any,
ffi::OsString,
path::{Path, PathBuf},
sync::Arc,
};
use util::{maybe, ResultExt};
use util::{maybe, merge_json_value_into, ResultExt};
fn typescript_server_binary_arguments(server_path: &Path) -> Vec<OsString> {
vec![server_path.into(), "--stdio".into()]
@@ -274,17 +274,29 @@ impl LspAdapter for VtslsLspAdapter {
cx: &mut AsyncAppContext,
) -> Result<Value> {
let override_options = cx.update(|cx| {
ProjectSettings::get_global(cx)
.lsp
.get(SERVER_NAME)
.and_then(|s| s.initialization_options.clone())
ProjectSettings::get(
Some(SettingsLocation {
worktree_id: adapter.worktree_id(),
path: adapter.worktree_root_path(),
}),
cx,
)
.lsp
.get(SERVER_NAME)
.and_then(|s| s.initialization_options.clone())
})?;
if let Some(options) = override_options {
return Ok(options);
}
self.initialization_options(adapter)
let mut initialization_options = self
.initialization_options(adapter)
.await
.map(|o| o.unwrap())
.map(|o| o.unwrap())?;
if let Some(override_options) = override_options {
merge_json_value_into(override_options, &mut initialization_options)
}
Ok(initialization_options)
}
fn language_ids(&self) -> HashMap<String, String> {

View File

@@ -219,7 +219,7 @@ async fn load_shell_environment(
);
let output = smol::process::Command::new(&shell)
.args(["-i", "-c", &command])
.args(["-l", "-i", "-c", &command])
.envs(direnv_environment)
.output()
.await

View File

@@ -644,7 +644,7 @@ impl<T: Ord + Clone> RangeExt<T> for RangeInclusive<T> {
/// This is useful for turning regular alphanumerically sorted sequences as `1-abc, 10, 11-def, .., 2, 21-abc`
/// into `1-abc, 2, 10, 11-def, .., 21-abc`
#[derive(Debug, PartialEq, Eq)]
pub struct NumericPrefixWithSuffix<'a>(Option<u32>, &'a str);
pub struct NumericPrefixWithSuffix<'a>(Option<u64>, &'a str);
impl<'a> NumericPrefixWithSuffix<'a> {
pub fn from_numeric_prefixed_str(str: &'a str) -> Self {

View File

@@ -1364,6 +1364,9 @@ impl Pane {
self.activation_history
.retain(|entry| entry.entity_id != self.items[item_index].item_id());
if self.is_tab_pinned(item_index) {
self.pinned_tab_count -= 1;
}
if item_index == self.active_item_index {
let index_to_activate = self
.activation_history

View File

@@ -2,7 +2,7 @@
description = "The fast, collaborative code editor."
edition = "2021"
name = "zed"
version = "0.153.0"
version = "0.153.3"
publish = false
license = "GPL-3.0-or-later"
authors = ["Zed Team <hi@zed.dev>"]

View File

@@ -1 +1 @@
dev
preview