Release Notes:
- linux: Added a fallback Open picker for when XDG is not working
- Added a new setting `use_system_path_prompts` (default true) that can
be disabled to use Zed's builtin keyboard-driven prompts.
---------
Co-authored-by: Max <max@zed.dev>
This PR extends the extensions page with support for upselling built-in
Zed features when certain keywords are searched for.
This should help inform users about features that Zed has out-of-the-box
when they go looking for them as extensions.
For example, when someone searches "vim":
<img width="1341" alt="Screenshot 2024-07-15 at 4 58 44 PM"
src="https://github.com/user-attachments/assets/b256d07a-559a-43c2-b491-3eca5bff436e">
Here are more examples of what the upsells can look like:
<img width="1341" alt="Screenshot 2024-07-15 at 4 54 39 PM"
src="https://github.com/user-attachments/assets/1f453132-ac14-4884-afc4-7c12db47ad1d">
Release Notes:
- Added banners for built-in Zed features when corresponding keywords
are used in the extension search.
Provide a current, broken state as an experimental way to browse
diagnostics.
The diagnostics are grouped by lines and reduced into a block that, in
case of multiple diagnostics per line, could be toggled back and forth
to show more diagnostics on the line.
Use `grouped_diagnostics::Deploy` to show the panel.
Issues remaining:
* panic on warnings toggle due to incorrect excerpt manipulation
* badly styled blocks
* no key bindings to navigate between blocks and toggle them
* overall odd usability gains for certain groups of people
Due to all above, the thing is feature-gated and not exposed to regular
people.
Release Notes:
- N/A
TODO:
- [x] Actions run from menu not firing
- [x] Menu differentiates idle and busy for running kernel
Menu States:
- [x] No session && no support known
No session && no kernel installed for languages of known support
- (TODO after) Intro to REPL
- [x] Link to docs
No session but can start one
- [x] Start REPL
- (TODO after) More info -> Docs?
Yes Session
- [x] Info: Kernel name, language
example: chatlab-3.7-adsf87fsa (Python)
example: condapy-3.7 (Python)
- [x] Change Kernel -> https://zed.dev/docs/repl#change-kernel
- ---
- [x] Run
- [x] Interrupt
- [x] Clear Outputs
- ---
- [x] Shutdown
(Release notes left empty as the change will be documented in the REPL
release!)
Reserved for a follow on PR:
```
- [ ] Status should update when the menu is open (missing `cx.notify`?)
- [ ] Shutdown all kernels action
- [ ] Restart action
- [ ] [Default kernel changed - restart (this kernel) to apply] // todo!(kyle): need some kind of state thing that says if this has happened
```
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Release Notes:
- Added support for following into the assistant panel.
---------
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Nathan <nathan@zed.dev>
Do not require the `prettier` dependency name to be in package.json's
[dev]Dependencies, instead just checking the `node_modules` contents.
Release Notes:
- Improved `prettier` detection to pick up its installation from
transitive dependencies
([12731](https://github.com/zed-industries/zed/issues/12731)
Follow-up of https://github.com/zed-industries/zed/pull/12909
* Fully preserve LSP data when sending it via collab, and only strip it
on the client.
* Avoid extra custom request handlers, and extend multi LSP server query
protocol instead.
Release Notes:
- N/A
Otherwise, ctrl-c makes them stuck being held from time to time
Follow-up of https://github.com/zed-industries/zed/pull/13898 that
reverts the macOS-related part of the PR.
Release Notes:
- N/A
This is a ~small~ pure refactor that's a step toward SSH remoting. I've
extracted the Project's buffer state management into a smaller, separate
struct called `BufferStore`, currently in the same crate. I did this as
a separate PR to reduce conflicts between main and `remoting-over-ssh`.
The idea is to make use of this struct (and other smaller structs that
make up `Project`) in a dedicated, simpler `HeadlessProject` type that
we will use in the SSH server to model the remote end of a project. With
this approach, as we develop the headless project, we can avoid adding
more conditional logic to `Project` itself (which is already very
complex), and actually make `Project` a bit smaller by extracting out
helper objects.
Release Notes:
- N/A
This PR updates the `/docs` slash command with basic globbing support
for expanding docs.
A `*` can be added to the item path to signify the end of a prefix
match.
For example:
```
# This will match any documentation items starting with `auk::`.
# In this case, it will pull in the docs for each item in the crate.
/docs docs-rs auk::*
# This will match any documentation items starting with `auk::visitor::`,
# which will pull in docs for the `visitor` module.
/docs docs-rs auk::visitor::*
```
https://github.com/user-attachments/assets/5e1e21f1-241b-483f-9cd1-facc3aa76365
Release Notes:
- N/A
This is a follow up of #14218 , since we open the window based on the
size of the client area, `window_bounds` should also return the size of
the client area to maintain consistency.
Release Notes:
- N/A
This PR improves the error message shown by the `/docs` slash command
when indexing fails due to the absence of `target/doc`.
We now distinguish between the overall `target/doc` directory missing
and an individual crate directory missing beneath it.
Release Notes:
- N/A
I don't intend fully on getting this merged, this is just an experiment
on using `direnv` directly without relying on shell-specific behaviours.
It works though, so this finally closes#8633
Release Notes:
- Fixed nushell not picking up `direnv` environments by directly
interfacing with it using `direnv export`
---------
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
With this setting, markdown files are one of the few that get a line
wrap indicator, a vertical line on the right, which confuses people.
Release Notes:
- N/A
Release Notes:
- vim: Added `-`/`+` to go to beginning of line above/below
([#14183](https://github.com/zed-industries/zed/issues/14183)).
- vim: (Breaking) Removed non-standard builtin binding from `-` to open
the project panel. You can re-add it to your keymap file with:
`{"context":"VimControl", "bindings":{ "-":
"pane::RevealInProjectPanel"}}`
Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.
https://github.com/zed-industries/zed/assets/32429059/0e9e9348-265e-4a81-a45a-4739034dc5d9
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This change pulls in https://github.com/kvark/blade/pull/135 and updates
the simplelog dependency for compatibility with that.
Release Notes:
- linux: Show link to troubleshooting docs when we can't open a window
This PR updates the `/docs` slash command to show a warning to the user
if a crate's docs cannot be indexed due to the target directory not
containing docs:
<img width="782" alt="Screenshot 2024-07-11 at 5 11 46 PM"
src="https://github.com/user-attachments/assets/2f54f7a1-97f4-4d2d-b51f-57ba31e50a2f">
Release Notes:
- N/A
Add support for aligning items to the baseline.
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
This PR updates the `/docs` slash command to use a more generic icon to
convey docs.
It was still using the Rust icon, a relic of when it was still
`/rustdoc`.
Release Notes:
- N/A
Release Notes:
- vim: (BREAKING) Improved vim keymap contexts.
Previously `vim_mode == normal` was true even when operators were
pending, which led to bugs like #13789 and a requirement for custom
keymaps to exclude various conditions like (`!VimObject` and
`!VimWaiting`) to avoid bugs.
Now `vim_mode` will be set to `operator` or `waiting` in these cases as
described in [the docs](https://zed.dev/docs/vim#keybindings). For most
custom keymaps this change will be a no-op or an improvement, but if you
were deliberately relying on the old behaviour (if you were relying on
`VimObject` or `VimWaiting` becoming true) you will need to update your
keymap.
---------
Co-authored-by: Thorsten <thorsten@zed.dev>
# Issue
When a user does something that changes the cursor shape, such as when
switching between vim modes, there may be an up to 500ms (cursor blink
interval) delay until the user receives feedback for their action. This
happens when the shape change happens during the invisible phase of a
blink - the user will not see the cursor shape change until the next
phase, which could be 500ms away.
# Solution
Cursor shape changes should disrupt blinking by forcing the cursor to be
shown, this results in immediate feedback for shape changes. This is in
line with the behavior of other editors I've tried.
Release Notes:
- Improved visual feedback when changing cursor shape
When I implemented #13701, I kinda messed up with the reversed
selections, thinking that their anchors are flipped, so I flipped them
again. This caused the reverse selections to always be cleared
Release Notes:
- Fix reverse selections always being cleared, even if the right click
was performed inside
TODO:
- [ ] File a PR with Yarn to add Zed to the list of supported IDEs.
Fixes: https://github.com/zed-industries/zed/issues/10107
Fixes: https://github.com/zed-industries/zed/issues/13706
Release Notes:
- Improved experience in projects using Yarn. Run `yarn dlx
@yarnpkg/sdks base` in the root of your project in order to elevate your
experience.
---------
Co-authored-by: Saurabh <79586784+m4saurabh@users.noreply.github.com>
The underlying container had width of 0.75 rem, which was equal to 12px
at default ui_font_size. However, with larger values of ui_font_size the
scrollbar would drift towards the center of a project panel, as the
scrollbar itself has a fixed width of 12 pixels. This commit moves
towards using a fixed width of 12px for scrollbar container. The
alternative was to make the scrollbar scale with ui_font_size, but that
isn't what the Editor scrollbar does, so I decided against it.
Release Notes:
- Fixed position of scrollbar in project panel with non-default
`ui_font_size` values.
On macOS, when `terminal.option_as_meta` is enabled, pressing key
combinations like `option+b` and `option+f` would lead to both an escape
sequence being sent to the terminal (the expected behavior with
`option_as_meta == true`) AND a character being inserted (the behavior
when `option_as_meta == false`). Prevent the latter by stopping
propagation of the key-down event if it corresponds to a terminal escape
sequence and `option_as_meta` is enabled.
Fixes#7728
Release Notes:
- Fixed insertion of extra characters for some keystrokes if
`terminal.option_as_meta` is enabled
([#7728](https://github.com/zed-industries/zed/issues/7728)).
For: #13417
This is a simple version, I'm not sure if we just need to limit this
feature to vim mode, or maybe in normal editor mode, which involves
other logic like the location of the setting
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Release Notes:
- Fixed default font_family crash on Windows, use `Segoe UI`.
## Crash error message
```
thread 'main' panicked at crates\gpui\src\text_system.rs:150:9:
failed to resolve font 'Helvetica' or any of the fallbacks:
Zed Plex Mono, Helvetica, Cantarell, Ubuntu, Noto Sans, DejaVu Sans
```
Release Notes:
- N/A
----
Continue #14044 for Windows
## The problem
The `cx.open_window` method has provided us a `window_kind` option to
allows creating a Popup kind. This behavior can work on macOS, the popup
kind window have no-border, no-shadow, no-resize, and followed the
`is_movable` if present true it can't move.
This PR to fix those supports on Windows.
The border and shadow still exist, I have tried to use WS_POPUP
window_style, but it will crash:
> This is looks like complex, it is out of my known.
```
Blocking waiting for file lock on build directory
Compiling gpui v0.1.0 (F:\work\zed\crates\gpui)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.96s
Running `target\debug\examples\window_positioning.exe`
thread 'main' panicked at F:\Users\jason\.cargo\git\checkouts\blade-b2bcd1de1cf7ab6a\21a56f7\blade-graphics\src\vulkan\init.rs:864:18:
called `Result::unwrap()` on an `Err` value: ERROR_OUT_OF_DEVICE_MEMORY
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\examples\window_positioning.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
```
So I just make a simple change, to use `WS_EX_TOOLWINDOW` this can
disable resize, and connect `is_movable` to `handle_hit_test_msg` to
disable move, and also no Status Bar icon.
## Before
https://github.com/zed-industries/zed/assets/5518/76740a71-e0ba-401f-958d-f4afdeb417c6
## After
https://github.com/zed-industries/zed/assets/5518/dca49f13-914c-425a-b8b6-b9fc15f8d208
Also, allow proto messages to be deserialized. This is to support
translating these messages JS types in a new server implementation based
on CloudFlare durable objects.
Release Notes:
- N/A
Release Notes:
- Fixed line wrap for CJK characters.
## Demo
https://github.com/zed-industries/zed/assets/5518/c6695bb4-b170-4ce0-9a84-c36b051de438
![diff](https://github.com/zed-industries/zed/assets/5518/318bc815-1018-485c-aa16-49c775a9f402)
Fix issues: #4623#11202
### Render case
```
## fr
Bien démarrer avec la documentation GitHub Découvrez comment commencer à créer, à livrer et à gérer des logiciels avec GitHub. Explorez nos produits, inscrivez-vous pour obtenir un compte et connectez-vous à la plus grande communauté de développement du monde.
## zh
GitHub 入门文档 了解如何开始构建、运输和维护具有 GitHub 的软件。 了解我们的产品,注册一个帐户,与世界上最大的发展社区建立联系。
## es
Documentación sobre la introducción a GitHub Aprende cómo comenzar a crear, enviar y mantener software con GitHub. Explora nuestros productos, regístrate para una cuenta y conéctate con la comunidad de desarrollo más grande del mundo.
## kr
GitHub 설명서 시작 GitHub를 사용하여 소프트웨어 빌드, 납품 및 유지 관리를 시작하는 방법을 알아봅니다. 제품을 탐색하고, 계정에 등록하고, 세계 최대의 개발 커뮤니티와 연결합니다.
## ja
GitHub の概要に関するドキュメント GitHub を使用してソフトウェアの構築、出荷、および保守を始める方法を学びます。 当社の製品を探索し、アカウントにサインアップして、世界最大の開発コミュニティと繋がりましょう。
## pt
Documentação de introdução ao GitHub Aprenda a começar a criar, enviar e manter um software com a GitHub. Explore nossos produtos, inscreva-se em uma conta e conecte-se com a maior comunidade de desenvolvimento do mundo.
## ru
Начало работы с документацией по GitHub Узнайте, как начать создание, доставку и обслуживание программного обеспечения с помощью GitHub. Изучите наши продукты, зарегистрируйте учетную запись и присоединитесь к крупнейшему в мире сообществу разработчиков.
```
This restores https://github.com/zed-industries/zed/pull/13943 which was
reverted in #13974 because it was possible to get in a state where focus
could not be restored on a window.
In this PR there's an additional change: `FocusIn` and `FocusOut` events
are always handled, even if the `event.mode` is not "NORMAL". In my
testing, `alt-tabbing` between windows didn't produce `FocusIn` and
`FocusOut` events when we had that check. Now, with the check removed,
it's possible to switch focus between two windows again with `alt-tab`.
Release Notes:
- N/A
---------
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Must enable extra-traits of syn feature to enable Debug trait of
Visibility
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
The biggest hurdle turned out to be use of `Arc<Language>` in maps, as
`clippy::mutable_key_type` started triggering on it (due to - I suppose
- internal mutability on `HighlightMap`?). I switched over to using
`LanguageId` as the key type in some of the callsites, as that's what
`Language` uses anyways for it's hash/eq, though I've still had to
suppress the lint outside of language crate.
/cc @maxdeviant , le clippy guru.
Release Notes:
- N/A
This pull request introduces collaboration for the assistant panel by
turning `Context` into a CRDT. `ContextStore` is responsible for sending
and applying operations, as well as synchronizing missed changes while
the connection was lost.
Contexts are shared on a per-project basis, and only the host can share
them for now. Shared contexts can be accessed via the `History` tab in
the assistant panel.
<img width="1819" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/c7ae46d2-cde3-4b03-b74a-6e9b1555c154">
Please note that this doesn't implement following yet, which is
scheduled for a subsequent pull request.
Release Notes:
- N/A
For now extensions can only register global snippets, but there'll be
follow-up work to support scope attribute in snippets.json.
Release Notes:
- Extensions can now provide snippets by including `snippets.json` file
next to the extension manifest.
---------
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR adds margin style methods to the `Label` and `LabelLike`
components.
This allows for callers to provide a margin to these components without
needing to introduce a wrapping `div` to do so.
Release Notes:
- N/A
This PR removes some wrapping elements that were used inside of the chat
panel.
To facilitate this, the `Label` component now has a `weight` method to
change the font weight.
Release Notes:
- N/A
This PR fixes the off by one pixel of the top client rect when not
maximized due to the added border. It also simplifies and properly fixes
the title bar padding problem when maximized, it is now properly taken
care of in GPUI rather then adding the padding in the UI.
Release Notes:
- N/A
This is related to #9428
I noticed that doing a search and replace for the beginning of a line
`^` results in the trailing line being included in the search. This
seems to be because of the way the range is generated for generating
matches being the up to the start of the trailing line rather than up to
the end of the last line.
I added a test and took a stab at fixing it but it is a bit yolo as this
is the first time I've seen this codebase.
This PR begins the process of breaking up the `style_helpers!` macro
into smaller macros that can be used to generate methods for a related
subset of styles.
The style method macros also now accept an optional `visibility`
parameter to control the visibility of the generated methods. This
allows for adding these methods to a struct instead of a just a trait.
For example, to expose just the padding styles on a `Facepile` we can do
this:
```rs
impl Facepile {
fn style(&mut self) -> &mut StyleRefinement {
self.base.style()
}
gpui::padding_style_methods!({
visibility: pub
});
}
```
Release Notes:
- N/A
Move telemetry temp files from `config_dir` to `log_dir`. Fixes#7155
- On MacOS: from `~/.config/zed` to `~/Library/Logs/Zed`
- On Linux: from `~/.config/zed` to `.local/share/zed/logs` (or
`$FLATPAK_XDG_DATA_HOME/zed/logs`).
Release Notes:
- Fixed telemetry putting temporary files in config_dir
([#7155](https://github.com/zed-industries/zed/issues/7155)).
The problem seemingly was that scrolling only started after autoscroll
has finished. I have added a function to forcefully stop it, which I
call when scroll event happens
Release Notes:
- Fixed delay when changing scrolling direction (#13720)
---------
Co-authored-by: Piotr <piotr@zed.dev>
This PR removes some extraneous `Cargo.lock` files for the `storybook`
and `sqlez` crates.
These lockfiles were not used, as everything uses the workspace's
`Cargo.lock`.
Release Notes:
- N/A
This PR refactors the style definitions in the `gpui_macros` style
helpers to use structs instead of tuples for additional clarity.
Release Notes:
- N/A
Release Notes:
- Move snippet support into core editor experience, marking the official
extension as deprecated. Snippets now show up in any buffer (including
plain text buffers).
This reverts #13943 and reopens#13897 since the fix in #13943 comes
with a regression:
Sometimes Zed loses keyboard focus and can't be restored. I haven't
figured out yet exactly when and how this happens and can't reliably
reproduce it yet, but there's something off with focus handling.
One reliable way to reproduce _one_ of the problems:
1. Open two zed windows
2. Focus one Zed window
3. Hover with the mouse over the other
4. Try to type in the window that should still be focused
So, to be careful, I'm going to revert the PR first, since I couldn't
find an obvious fix yet. If we do find a fix, we can unrevert.
Release Notes:
- N/A
This change adds ability to choose any action from prompts, not just the
default one and cancel as Zed has right now. For example, when a user
tries to close a file with edits in it the prompt offers "Don't save"
option that can be selected only with mouse. Now you can use arrows,
tab/shift-tab to pick action and enter/space to confirm it.
Fixes [#13906](https://github.com/zed-industries/zed/issues/13906)
Release Notes:
- Added keyboard navigation in the prompts on Linux
([#13906](https://github.com/zed-industries/zed/issues/13906)).
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
These were previously passed directly to the editor module, which knows
nothing about vim counts. Instead, implement new actions in the vim
module which take the count and use it to invoke the corresponding
action in the editor module, properly repeated.
Release Notes:
- Fixed vim undo and redo commands not taking counts.
Adds the `compositor_support` to the `X11WindowState` struct so that
correct window decorations are selected
Release notes:
- N/A
---------
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This PR refactors the `TitleBar` component to move all of the
collab-related code into the `collab` module.
This simplifies the top-level `Render` implementation of `TitleBar` by a
lot and makes it easier to read.
Release Notes:
- N/A
This PR adds a `NumericStepper` component that can be used to display a
numeric value along with controls to increment, decrement, and reset the
value.
The `ApplicationMenu` has been updated to use the `NumericStepper` for
adjusting the buffer and UI font size.
Here it is in action:
https://github.com/zed-industries/zed/assets/1486634/03cffe67-1256-4283-aa3d-560fffa06dad
Note: Due to the way we do font adjustments, once modified the reset
button will be displayed until it is clicked (or the font size
adjustment is otherwise reset). Simply returning to the original value
will currently not hide the reset button.
Release Notes:
- N/A
This PR consists of two main changes:
1. The first commit changes the `open` crate for opening URLs/paths for
the `OpenURI` desktop portal. This fixes the activation token not being
passed to programs (at least on KDE).
2. The second commit implements the window `activate()` API on Wayland.
This allows KWin and Mutter to show a visual indicator when the window
is requesting attention. (see
https://github.com/zed-industries/zed/issues/12557)
![image](https://github.com/zed-industries/zed/assets/71973804/ce148f8e-28fd-4249-8f8d-3a5828ed6f83)
Release Notes:
- N/A
This PR renames the `ui_text_field` crate to `ui_input` to make it a bit
more generic.
We'll likely end up with multiple kinds of input components in this
crate.
Release Notes:
- N/A
Release Notes:
- Added Linux-Specific keymaps for JetBrains, Atom and Sublime Text
- Improved MacOS-specific keymaps for JetBrains and Atom
- Improved Linux default keymap (VSCode compatibility)
- Windows now uses same keymap as Linux
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
Previously to these changes, as stated in the issue, when someone tried
to use TSX as language for the file, the language was not set and it
disappeared from the selectable language list. This was due to the fact
that that the three files were symlinks, and windows couldn't read them.
I replaced them with normal files.
Fixes#12208.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Pass on all the XkbStateNotify information to XKB.
> "All parameters must always be passed, or the resulting state may be
incoherent."
>
https://docs.rs/xkbcommon/latest/xkbcommon/xkb/struct.State.html#method.update_mask
Previously, many keymaps using multiple groups/layers would not work and
remain in group0.
Release Notes:
- Fixed handling of Xkb keymap groups on X11.
This addresses the question in [this
comment](https://github.com/zed-industries/zed/issues/5830#issuecomment-2211942554)
by adding support for `classAttributes` to the settings.
Meaning that the following Zed `settings.json` now works:
```jsonc
{
"lsp": {
"tailwindcss-language-server": {
"settings": {
"classAttributes": [
"class",
"className",
"ngClass",
// add styles so will give intellisense to styles constant.
"styles"
]
// Optional:
// "includeLanguages": {
// "erb": "html",
// "ruby": "html"
// },
// "experimental": {
// "classRegex": ["\\bclass:\\s*['\"]([^'\"]*)['\"]"]
// }
}
}
}
}
```
Release Notes:
- Added support for setting `classAttributes` in the configuration for
`tailwindcss-language-server`. Example: `{ "lsp": {
"tailwindcss-language-server": { "settings": { "classAttributes": [
"class", "className", "ngClass", "styles" ] } } } }`
```
Thread "main" panicked with "divide by zero error when dividing duration by scalar" at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/time.rs:1172:31
0: zed::reliability::init_panic_hook::{{closure}}
at crates/zed/src/reliability.rs:58:29
1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2036:9
std::panicking::rust_panic_with_hook
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:799:13
2: std::panicking::begin_panic_handler::{{closure}}
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:664:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:171:18
4: rust_begin_unwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5
5: core::panicking::panic_fmt
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:72:14
6: core::panicking::panic_display
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:263:5
7: core::option::expect_failed
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:1994:5
8: core::option::Option<T>::expect
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:895:21
<core::time::Duration as core::ops::arith::Div<u32>>::div
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/time.rs:1172:31
9: <gpui::platform::linux::wayland::client::WaylandClientStatePtr as wayland_client::event_queue::Dispatch<wayland_client::protocol::wl_keyboard::WlKeyboard,()>>::event::{{closure}}
at crates/gpui/src/platform/linux/wayland/client.rs:1211:63
10: <core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events::{{closure}}
at /home/atassis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/sources/mod.rs:327:61
11: <calloop::sources::timer::Timer as calloop::sources::EventSource>::process_events
at /home/atassis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/sources/timer.rs:122:38
12: <core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events
at /home/atassis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/sources/mod.rs:326:9
13: calloop::loop_logic::EventLoop<Data>::dispatch_events
at /home/atassis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/loop_logic.rs:445:31
14: calloop::loop_logic::EventLoop<Data>::dispatch
at /home/atassis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/loop_logic.rs:559:9
15: calloop::loop_logic::EventLoop<Data>::run
at /home/atassis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.13.0/src/loop_logic.rs:596:13
16: <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::run
at crates/gpui/src/platform/linux/wayland/client.rs:655:9
17: gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run
at crates/gpui/src/platform/linux/platform.rs:153:9
18: gpui::app::App::run
at crates/gpui/src/app.rs:140:9
19: zed::main
at crates/zed/src/main.rs:382:5
20: core::ops::function::FnOnce::call_once
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/function.rs:250:5
21: std::sys_common::backtrace::__rust_begin_short_backtrace
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:155:18
22: std::rt::lang_start::{{closure}}
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/rt.rs:159:18
23: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/function.rs:284:13
std::panicking::try::do_call
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:559:40
std::panicking::try
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:523:19
std::panic::catch_unwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panic.rs:149:14
std::rt::lang_start_internal::{{closure}}
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/rt.rs:141:48
std::panicking::try::do_call
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:559:40
std::panicking::try
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:523:19
std::panic::catch_unwind
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panic.rs:149:14
std::rt::lang_start_internal
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/rt.rs:141:20
24: std::rt::lang_start
at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/rt.rs:158:17
25: main
26: __libc_start_call_main
27: __libc_start_main_impl
28: _start
```
This error was happening when I started typing. This PR fixes this
error.
Fedora 40, latest kernel, gnome 46, wayland.
Release Notes:
- N/A
Sets up the `cmd-enter` keybinding for the jupyter repl to only apply
when enabled.
Release Notes:
- N/A
---------
Co-authored-by: Kirill <kirill@zed.dev>
This PR updates the extension API to use structured slash command
completions instead of plain strings.
This allows slash commands defined in extensions to take advantage of
the improvements made in #13876.
Release Notes:
- N/A
This PR improves the completions for arguments in the `/docs` slash
command.
We achieved this by extending the `complete_argument` method on the
`SlashCommand` trait to return a `Vec<ArgumentCompletion>` instead of a
`Vec<String>`.
In addition to the completion `label`, `ArgumentCompletion` has two new
fields that are can be used to customize the completion behavior:
- `new_text`: The actual text that will be inserted when the completion
is accepted, which may be different from what is shown by the completion
label.
- `run_command`: Whether the command is run when the completion is
accepted. This can be set to `false` to allow accepting a completion
without running the command.
Release Notes:
- N/A
---------
Co-authored-by: Antonio <antonio@zed.dev>
This PR replaces the usage of `unzip` for extracting `.zip` files
downloaded by extensions with extraction via a library.
This will allow us to extract `.zip` files even if `unzip` is not
available (e.g., on Windows).
Release Notes:
- Removed the need for `unzip` to be present on the system to extract
`.zip` files downloaded by extensions.
Initial runtimes UI panel. The main draw here is that all message
subscription occurs with two background tasks that run for the life of
the kernel. Follow on to #12062
* [x] Disable previous cmd-enter behavior only if runtimes are enabled
in settings
* [x] Only show the runtimes panel if it is enabled via settings
* [x] Create clean UI for the current sessions
### Running Kernels UI
<img width="205" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/814ae79b-0807-4e23-bc95-77ce64f9d732">
* [x] List running kernels
* [x] Implement shutdown
* [x] Delete connection file on `drop` of `RunningKernel`
* [x] Implement interrupt
#### Project-specific Kernel Settings
- [x] Modify JupyterSettings to include a `kernel_selections` field
(`HashMap<String, String>`).
- [x] Implement saving and loading of kernel selections to/from
`.zed/settings.json` (by default, rather than global settings?)
#### Kernel Selection Persistence
- [x] Save the selected kernel for each language when the user makes a
choice.
- [x] Load these selections when the RuntimePanel is initialized.
#### Use Selected Kernels
- [x] Modify kernel launch to use the selected kernel for the detected
language.
- [x] Fallback to default behavior if no selection is made.
### Empty states
- [x] Create helpful UI for when the user has 0 kernels they can launch
and/or 0 kernels running
<img width="694" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/d6a75939-e4e4-40fb-80fe-014da041cc3c">
## Future work
### Kernel Discovery
- Improve the kernel discovery process to handle various installation
methods (system, virtualenv, poetry, etc.).
- Create a way to refresh the available kernels on demand
### Documentation:
- Update documentation to explain how users can configure kernels for
their projects.
- Provide examples of .zed/settings.json configurations for kernel
selection.
### Kernel Selection UI
- Implement a new section in the RuntimePanel to display available
kernels.
- Group on the language name from the kernel specification
- Create a dropdown for each language group to select the default
kernel.
Release Notes:
- N/A
---------
Co-authored-by: Kirill <kirill@zed.dev>
Introduces the `ZED_WINDOW_DECORATIONS` env variable.
- Not set, defaulting to client-side decorations
- Value is "client": client-side decorations
- Value is "server": server-side decorations
I think it's good to have this escape-hatch next to all possible
detection mechanisms.
Release Notes:
- N/A
By leveraging the `_GTK_EDGE_CONSTRAINTS` atom we can get all four
booleans for the `Tiling` struct and figure out which side is free when
the window is tiled to half of the screen.
For the logic behind the `_GTK_EDGE_CONSTRAINTS` see:
-
8e9d13aa3b/src/x11/window-x11.c (L65-L75)
-
8e9d13aa3b/src/x11/window-x11.c (L1205-L1231)
(I used Claude 3.5 Sonnet with our code and these pieces from `mutter`
to generate the Rust code, that was pretty sweet)
This fixes the gap in the middle when a GPUI window is tiled to the left
and another window to the right.
It's not _perfect_ but it looks a lot better.
Here's a diff that makes it look better:
```diff
diff --git a/crates/gpui/examples/window_shadow.rs b/crates/gpui/examples/window_shadow.rs
index 122231f6b..7fa29dadc 100644
--- a/crates/gpui/examples/window_shadow.rs
+++ b/crates/gpui/examples/window_shadow.rs
@@ -72,8 +72,8 @@ impl Render for WindowShadow {
.when(!(tiling.top || tiling.left), |div| div.rounded_tl(rounding))
.when(!tiling.top, |div| div.pt(shadow_size))
.when(!tiling.bottom, |div| div.pb(shadow_size))
- .when(!tiling.left, |div| div.pl(shadow_size))
- .when(!tiling.right, |div| div.pr(shadow_size))
+ .when(!tiling.left, |div| div.pl(shadow_size - border_size))
+ .when(!tiling.right, |div| div.pr(shadow_size - border_size))
.on_mouse_move(|_e, cx| cx.refresh())
.on_mouse_down(MouseButton::Left, move |e, cx| {
let size = cx.window_bounds().get_bounds().size;
```
But that makes it look weird on Wayland, so I didn't do it.
I think it's fine for now. Chromium looks bad and has a gap, so we're
already better.
## Before
![before_1](https://github.com/zed-industries/zed/assets/1185253/875c5cdd-c0be-4295-beb0-bb9ba5beaa52)
![before_2](https://github.com/zed-industries/zed/assets/1185253/0b96be70-4c34-4e99-aeb2-ab741171ad14)
## After
![after_1](https://github.com/zed-industries/zed/assets/1185253/aa51da77-daf1-4ef8-a33f-a83731e0c7e1)
![after_2](https://github.com/zed-industries/zed/assets/1185253/8ce7902d-90b6-4f06-ba2c-626e643abe56)
Release Notes:
- N/A
This PR refactors the completion providers to only process a maximum
amount of completion requests at a time.
Also started refactoring language model providers to use traits, so it's
easier to allow specifying multiple providers in the future.
Release Notes:
- N/A
This fixes the issue of a tooltip covering the thing that the button has
revealed.
It also mirrors what other UI frameworks do. Chrome on Linux behaves the
same, and Safari does the same thing on macOS.
It fixes this:
![Screenshot from 2024-07-05
12-39-22](https://github.com/zed-industries/zed/assets/1185253/51ce4347-d12f-463a-9adb-da031fe2f751)
Release Notes:
- N/A
This has been bugging me for a while. If you create a new file and then
save it, the dialogue would show the home directory and not the folder
that you were in.
This fixes it.
Release Notes:
- N/A
**Edit**:
This PR adds flushes to functions which should have an immediate affect.
I've observed it fixing the following bugs (but there are probably
more):
- The cursor not updating when just hovering.
- The window not maximising after clicking the full-screen button until
you move the mouse.
- The window not minimising after clicking the minimise button until you
move the mouse.
---
**Original content**:
Following #13646, the cursor style wouldn't change because the
`change_window_attributes` command wasn't being flushed. I guess it was
working before because something else was flushing it somewhere else so
it was never noticed.
I just added `check()` which flushes the command so that the cursor will
actually update when just hovering. Before you would need to interact
with the window so that something else could flush the command.
Release Notes:
- N/A
With the new window decorations resizing was _really_ laggy on my X11
machine.
Before:
- Click on window border (hitbox doesn't work properly, but that's
another issue)
- Drag and resize
- 4-5s nothing happens
- Window is resized
After:
- Click on window border
- Drag and resize
- Window is resized
I'm still not 100% sure on why this happens on my machine and not
Conrad's/Mikayla's, but seems like that GTK_EDGE_CONSTRAINTS atom is
sent when resizing.
The other thing that I can't explain is that we get a `ConfigureNotify`
when resizing, with the right size, but maybe not often enough?
Anyway, for now we'll go with this.
Release Notes:
- N/A
In the latest update, panel loading occasionally occurred randomly,
either before or after workspace deserialization due to their
asynchronous nature. This update addresses the issue by ensuring panels
restore their state based on serialized data, synchronizing their
loading with workspace deserialization.
Release Notes:
- Fixed [#9638](https://github.com/zed-industries/zed/issues/9638)
- Fixed [#12954](https://github.com/zed-industries/zed/issues/12954)
This PR removes the `ids` query parameter from the `GET /extensions`
endpoint, as we don't use it.
We originally added the query parameter in #9929 to facilitate
auto-updates. However, it was superseded by the `GET
/extensions/updates` endpoint in #10052.
There shouldn't be any Zed versions out in the wild that are using the
`ids` query parameter, as we added the endpoint on Thursday, March 28,
and replaced its usage with the new endpoint on Monday, April 1, before
the next Zed release.
Release Notes:
- N/A
In doing so we get to surface origin packages more prominently.
Fixes#13494 (again)
Release Notes:
- Fixed origin packages not being surfaced in Rust completions
This PR adds a new `/docs` slash command to the Assistant. This slash
command replaces `/rustdoc`.
The `/docs` slash command works with different providers. There is
currently a built-in provider for rustdoc, but new providers can be
defined within extensions. The Gleam extension contains an example of
this.
When you first type `/docs` a completion menu will be shown with the
list of available providers:
https://github.com/zed-industries/zed/assets/1486634/32287000-5855-44d9-a2eb-569596f5abd9
After completing the provider you want to use then you can type the
package name and/or item path to search for the relevant docs:
https://github.com/zed-industries/zed/assets/1486634/6fc55a63-7fcd-42ea-80ce-08c670bf03fc
There are still some rough edges around completions that I would like to
get cleaned up in a future PR. Both of these seem to stem from the fact
that we're using an intermediate completion in the slash command:
1. Accepting a provider completion will show an error until you press
<kbd>Space</kbd> to continue typing.
- We need a way of not submitting a slash command when a completion is
accepted.
2. We currently need to show the provider name in the documentation item
completion list.
- Without it, the provider name gets wiped out when accepting a
completion, causing the slash command to become invalid.
Release Notes:
- N/A
This PR adds support for full client side decorations on X11 and Wayland
TODO:
- [x] Adjust GPUI APIs to expose CSD related information
- [x] Implement remaining CSD features (Resizing, window border, window
shadow)
- [x] Integrate with existing background appearance and window
transparency
- [x] Figure out how to check if the window is tiled on X11
- [x] Implement in Zed
- [x] Repeatedly maximizing and unmaximizing can panic
- [x] Resizing is strangely slow
- [x] X11 resizing and movement doesn't work for this:
https://discord.com/channels/869392257814519848/1204679850208657418/1256816908519604305
- [x] The top corner can clip with current styling
- [x] Pressing titlebar buttons doesn't work
- [x] Not showing maximize / unmaximize buttons
- [x] Noisy transparency logs / surface transparency problem
https://github.com/zed-industries/zed/pull/13611#issuecomment-2201685030
- [x] Strange offsets when dragging the project panel
https://github.com/zed-industries/zed/pull/13611#pullrequestreview-2154606261
- [x] Shadow inset with `_GTK_FRAME_EXTENTS` doesn't respect tiling on
X11 (observe by snapping an X11 window in any direction)
Release Notes:
- N/A
---------
Co-authored-by: conrad <conrad@zed.dev>
Co-authored-by: Owen Law <81528246+someone13574@users.noreply.github.com>
Co-authored-by: apricotbucket28 <71973804+apricotbucket28@users.noreply.github.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This is already done when selecting a subtest; by wrapping the test name
with `^{}$` the runnable will avoid selecting additional tests with the
same prefix.
Without this fix, selecting the runnable for `TestExample` will also run
`TestExample2`.
Release Notes:
- Fixed Golang tasks spawning tests starting with the current function name and not using the exact match.
This PR updates the `extension` crate's tests to use a dedicated test
extension for its tests instead of the real Gleam extension.
As the Gleam extension continues to evolve, it makes it less suitable to
use as a test fixture:
1. For a while now, the test has failed locally due to me having `gleam`
on my $PATH, which causes the extension's `get_language_server_command`
to go down a separate codepath.
2. With the addition of the `indexed_docs_providers` the test was
hanging indefinitely.
While these problems are likely solvable, it seems reasonable to have a
dedicated extension to use as a test fixture. That way we can do
whatever we need to exercise our test criteria.
The `test-extension` is a fork of the Gleam extension with some
additional functionality removed.
Release Notes:
- N/A
Here is an image of my now getting assistance responses!
![2024-07-03_08-45-37_swappy](https://github.com/zed-industries/zed/assets/20910163/904adc51-cb40-4622-878e-f679e0212426)
I ended up adding a function to handle the use case of not serializing
the tool_calls response if it is either null or empty to keep the
functionality of the existing implementation (not deserializing if vec
is empty). I'm sorta a noob, so happy to make changes if this isn't done
correctly, although it does work and it does pass tests!
Thanks a bunch to [amtoaer](https://github.com/amtoaer) for pointing me
in the direction on how to fix it.
Release Notes:
- Fixed some responses being dropped from OpenAI-compatible providers
([#13741](https://github.com/zed-industries/zed/issues/13741)).
This changes the implementation of the X11 client to use `mio`, as a
polling mechanism, and a custom run loop instead of `calloop` and its
callback-based approach.
We're doing this for one big reason: more control over how we handle
events.
With `calloop` we don't have any control over which events are processed
when and how long they're processes for. For example: we could be
blasted with 150 input events from X11 and miss a frame while processing
them, but instead of then drawing a new frame, calloop could decide to
work off the runnables that were generated from application-level code,
which would then again cause us to be behind.
We kinda worked around some of that in
https://github.com/zed-industries/zed/pull/12839 but the problem still
persists.
So what we're doing here is to use `mio` as a polling-mechanism. `mio`
notifies us if there are X11 on the XCB connection socket to be
processed. We also use its timeout mechanism to make sure that we don't
wait for events when we should render frames.
On top of `mio` we now have a custom run loop that allows us to decide
how much time to spend on what — input events, rendering windows, XDG
events, runnables — and in what order we work things off.
This custom run loop is consciously "dumb": we render all windows at the
highest frame rate right now, because we want to keep things predictable
for now while we test this approach more. We can then always switch to
more granular timings. But considering that our loop runs and checks for
windows to be redrawn whenever there's an event, this is more an
optimization than a requirement.
One reason for why we're doing this for X11 but not for Wayland is due
to how peculiar X11's event handling is: it's asynchronous and by
default X11 generates synthetic events when a key is held down. That can
lead to us being flooded with input events if someone keeps a key
pressed.
So another optimization that's in here is inspired by [GLFW's X11 input
handling](b35641f4a3/src/x11_window.c (L1321-L1349)):
based on a heuristic we detect whether a `KeyRelease` event was
auto-generated and if so, we drop it. That essentially halves the amount
of events we have to process when someone keeps a key pressed.
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Conrad <conrad@zed.dev>
This PR renames `ExtensionDocsIndexer` to `ExtensionIndexedDocsProvider`
to better align with the name of the trait it implements.
Release Notes:
- N/A
On Intel, Metal will pick a discrete GPU by default when available,
resulting in higher power consumption and heat output. Prefer
non‐removable low‐power devices to correct this.
On Apple Silicon, there is only ever one GPU, so there is no functional
change.
I didn’t do intensive benchmarking of this or anything, but Zed still
seems responsive and it stops my MacBook Pro acting as a combination
space heater–jet engine.
Thanks to @denlukia for showing that this is easy to fix; I’ve marked
you as a co‐author, I hope that’s okay.
Closes: #5124
Release Notes:
- Improved power consumption on Intel Macs by preferring integrated GPUs
over the discrete GPUs.
([#5124](https://github.com/zed-industries/zed/issues/5124)).
Co-authored-by: Denis Lukianenko <denlyk1@gmail.com>
The problem with #13459 was the bump to a newer JSON LS version, which
requires explicitly opting into validation.
Release Notes:
- Fixed JSON validation being disabled by default (Preview only)
Continuing from #13597, this PR refactors platform controls to extract a
generic set of platform controls that can be used for any platform that
does not define it's own/we don't use the system ones.
In the future, these controls will likely be used as a fallback on
windows as well when the windows icon font isn't available.
Release Notes:
- Added updated window controls on Linux
This PR begins the process of making the backing infrastructure for the
`/rustdoc` command more generic such that it can be applied to
additional documentation providers.
In this PR we:
- Rename the `rustdoc` crate to `indexed_docs` as a more general-purpose
name
- Start moving rustdoc-specific functionality into
`indexed_docs::providers::rustdoc`
- Add an `IndexedDocsRegistry` to hold multiple `IndexedDocsStore`s (one
per provider)
We haven't yet removed the rustdoc-specific bits in the `DocsIndexer`.
That will follow soon.
Release Notes:
- N/A
This implements the functionality (paired with @as-cii), but we weren't
sure what the clearest name would be for the action. It's essentially
the inverse of "quote selection" - but what's the opposite of quoting
the selection?
One idea:
* Rename "quote selection" to "Insert **into** assistant"
* Name this "Insert **from** assistant"
Release Notes:
- Added action to insert from assistant into editor (default keybinding:
`cmd-<` on macOS, `ctrl-<` on Linux)
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Bennet <bennet@zed.dev>
This PR updates the `html_to_markdown` crate with the necessary changes
to publish it to crates.io.
Publishing it makes it available for use within extensions when
implementing functionality for the Assistant.
Release Notes:
- N/A
This PR adds a new `fetch` function to the `zed_extension_api` to allow
fetching a URL through the Wasm host.
Currently we only support GET requests and return the response body as a
string.
Release Notes:
- N/A
* properly fetch outlines from channel notes and other project-less
external files
* show better messages when for no contents
* make file entries collapsible (hiding all excerpts and outlines
beneath), keep the initial panel state unfolded up to file level
Release Notes:
- Slightly improved project panel ergonomics
Context:
@bennetbo spotted a regression in handling of `cargo run` task in zed
repo following a merge of #13658. We've started invoking `cargo run`
from the folder of an active file whereas previously we did it from the
workspace root. We brainstormed few solutions that involved adding a
separate task that gets invoked at a workspace level, but I realized
that a cleaner solution may be to finally add user-configured task
variables. This way, we can choose which crate to run by default at a
workspace level.
This has been originally brought up in the context of javascript tasks
in
https://github.com/zed-industries/zed/pull/12118#issuecomment-2129232114
Note that this is intended for internal use only for the time being.
/cc @RemcoSmitsDev we should be unblocked on having runner-dependant
tasks now.
Release notes:
- N/A
This is just tests to verify [the fix for PageUp/PageDown in the
completions list](6e1b99b039) that was
previously added works properly. @SomeoneToIgnore Please check when you
have a moment. Thanks
Release Notes:
- N/A
As a drive-by of https://github.com/zed-industries/zed/pull/13654, I've
noticed that the editor felt sluggish after I've undone the changes made
by the replacement. It turns out that we are repeatedly checking whether
there are any edits to estabilish dirty/conflict state of a buffer, even
though this operation is pure; this PR stores away the result of a
computation and refers to it before rerunning it.
Release Notes:
- Improve editor's performance with large undo histories
Previously replace_all amounted to what could be achieved by repeatedly
mashing "Replace" button, which had a bunch of overhead related to
buffer state syncing. This commit gets rid of the automated button
mashing, processing all of the replacements in one go.
Fixes#13455
Release Notes:
- Improved performance of "replace all" in buffer search and project
search
Took me a while to figure out that I can't run
cargo run -p gpui --example animation
and that it has to run in the `gpui` crate.
So I thought I'd fix this.
Release Notes:
- N/A
The PageUp key was not working for the context menu. Instead of
selecting one of the previous items in the context menu, `MovePageUp`
closed the menu and scrolled the editor. `MovePageDown` was working
correctly because it has the same fix.
Release Notes:
- Fixed `pageup` key, when bound to `editor::MovePageUp`, not moving context menus as other keys
Repeats project panel duplicated file name logic for prompts:
* add a ` copy` suffix
* if conflicts still, add a ` i` digit suffix, where `i` is the first
number available starting from 1
Release Notes:
- N/A
Release Notes:
- Fixed a bug that was causing system prompts to be dropped for
Anthropic models.
@JosephTLyons @notpeter We probably need to hot-fix this as I'm pretty
sure this affects the regular anthropic provider in addition to just the
feature-flagged cloud stuff. Wouldn't mind confirming that first so we
can communicate around it. 😬
Now, when you selectively enable logs from particular crates with
`RUST_LOG=call,worktree`, logs created via `log_err` calls in those
crates get correctly enabled. Previously, they were all attributed to
the `util` crate, because they used the normal logging macros, which
implicitly insert the current crate name.
This relies on the regularity of our directory naming. Rust's
`track_caller` feature allows you to obtain the file system path of the
caller, but not its rust module path, so I'm inferring the crate name
from the file system path (which I believe is always valid, in our
codebase).
Release Notes:
- N/A
This PR extracts a singular title bar (`title_bar::TitleBar`) from
`ui::TitleBar` and
`collab_ui::collab_titlebar_item::CollabTitlebarItem`.
This is a first step towards organizing title bar things into one place,
and standardizing platform titlebar/window control implementations.
Release Notes:
- N/A
- Fixed issue where outline panel remains open despite being closed
before window close.
Before the release of Outline Panel feature, everything works fine. But
after that, the outline panel keeps open. It's very annoy that I only
want to edit a simple file. Event I close it before I close the window.
The active state of this panel didn't stored.
### Description:
Before the introduction of the Outline Panel feature, the application
behaved as expected. However, with the addition of the Outline Panel, an
issue arose where the panel would persistently remain open. This
behavior was observed even when manually closing the panel before
closing the application window. The problem stemmed from the inactive
state of the panel not being stored properly. This fix addresses the
issue by ensuring that the panel's active state is correctly stored and
retrieved, thereby improving user experience and preventing unnecessary
persistence of the panel's visibility.
### Screen Records
#### Before Release of Outline Panel
https://github.com/zed-industries/zed/assets/704762/2a222c70-c6d7-4472-9f27-7868d1786a5f
#### After Release of Outline Panel
https://github.com/zed-industries/zed/assets/704762/69c16a5d-beed-4d4a-8341-83c53f6a6713
#### After Fixing This Issue
https://github.com/zed-industries/zed/assets/704762/f51c5df7-54e3-4a62-ac54-b5d12cfe69d1
### Release Notes:
- Persist outline panel open state to avoid opening it on Zed startup
We were trying to access the binary at
package-version-server-{VERSION}/package-version-server, whereas the
binary itself is placed at package-version-server-{VERSION}
Release Notes:
- Fixed package.json language server failing to start.
Co-authored-by: Peter Tripp <peter@zed.dev>
This fixes#13360 by adding fallback directories that are searched by
the CLI if the main executable cannot be found in the `libexec`
directory.
Release Notes:
- Added the fallback directories `lib/zed` and `lib/zed-editor` for the
main executable search in the CLI
([#13360](https://github.com/zed-industries/zed/issues/13360)).
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This inline assistant prompt is one I designed that in my experience
works much better with Claude 3.5 Sonnet than the default prompt.
Mainly because it takes advantage of a weird property of our finetuning
which is that when you use XML tags it knows that it's doing a
machine-read tasks and stops trying to elide things for brevity. The
default prompt will often remove comments and otherwise add elisions for
brevity when doing large rewrites.
It also avoids giving the entire file content twice when the rewrite
region is large relative to the non-rewritten region.
Not necessarily meant to be merged as-is since it may mess up OAI
models. This is mainly meant for your reference. But everyone should be
using 3.5 Sonnet for coding use cases now anyhow 😛
Release Notes:
- N/A
Adds some of the UI components to allow us to visually render settings.
These are UI only and are not functional yet (@maxdeviant will be
working on these when he is back.)
You can see some examples by running `script/storybook setting`.
![CleanShot 2024-06-26 at 12 38
37@2x](https://github.com/zed-industries/zed/assets/1714999/b5e6434d-3bc5-4fcd-9c0a-d280950cbef2)
Release Notes:
- N/A
Release Notes:
- N/A
Fixed#13463 Fixed crash when the locale was non UTF-8 and fixed the
fallback locale.
Fixed#13010 Fixed crash when `compose.keysym()` was `XKB_KEY_NoSymbol`
I also extracted the `xkb_compose_state` to a single place
The previous implementation that I implemented had two issues:
1. It did not throw an error when the user input some invalid values
such as "panic".
2. The feature tag for OpenType fonts should be a combination of letters
and digits. We only checked if the input was an ASCII character, which
could lead to undefined behavior.
Closes#13517
Release Notes:
- N/A
Add a single-line text input example to gpui
(I'm hoping to be able to debug keyboard issues without rebuilding the
whole
app every time)
Release Notes:
- N/A
The clipboard library we use for X11 doesn't yet support multiple
formats on the clipboard, so for now we just store this in memory for
the current zed process, as we do for Wayland.
Fixes: #11971
Release Notes:
- N/A
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
It is sometimes desirable to allow modifers to serve as keys themselves
for the purposes of keybinds. For example, the popular keybind in
jetbrains IDEs `shift shift` which opens the file finder.
This change treats modifers in the keymaps as keys themselves if they
are not accompanied by a key they are modifying.
Further this change wires up they key dispatcher to treat modifer change
events as key presses which are considered for matching against
keybinds.
Release Notes:
- Fixes#6460
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
TODO:
- [x] Moving the cursor out of the title editor should unselect any
selected text
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Richard <richard@zed.dev>