This is a follow-up to #22615 and fixes the issue of `alacritty`
resulting in broken shell/CLI apps if `alacritty` is not in the terminfo
database.
Closes #ISSUE
Release Notes:
- Set `TERM` to `xterm-256color` in Zed's built-in terminal
This makes the `RemoveFromProject` action to remove all marked entries
in the project panel instead of just the selected one.
Closes#22454
Release Notes:
- Improved the `RemoveFromProject` action to remove all selected items.
This PR is a small refactoring in advance of some other changes.
Previously we were storing the whole `Context` associated with each
message. However, it's likely that multiple messages may end up using
the same context.
We now store the deduped context in a separate collection and refer to
it from each message by its `ContextId`.
Release Notes:
- N/A
Context pills for files will now only display the basename of the file.
If two files have the same base name, we will also show their parent
directories, mimicking the behavior of editor tabs.
https://github.com/user-attachments/assets/ee88ee3b-80ff-4115-9ff9-8fe4845a67d8
Note: The double `/` in the file picker is a known separate issue.
Release Notes:
- N/A
---------
Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Part of https://github.com/zed-industries/zed/issues/16472
Reduces amount of workspace serialization happening by:
* fixing the deserialization logic: now it does not set panels that are
hidden to active
* cleaning up `active_panel_index` for docks that are closed, to avoid
emitting extra events for such closed docks
* adjusting outline panel to drop active editor subscriptions on
deactivation — this way, `cx.observe` on the dock with outline panel is
not triggered (used to be triggered on every selection change before)
* adjusting workspace dock drag listener to remember previous
coordinates and only resize the dock if those had changed
* adjusting workspace pane event listener to ignore
`pane::Event::UserSavedItem` and `pane::Event::ChangeItemTitle` that
seem to happen relatively frequently but not influence values that are
serialized for the workspace
* not using `cx.observe` on docks, instead explicitly serializing on
panel zoom and size changes
Release Notes:
- Reduced amount of workspace serialization happening
Closes#17991
Release Notes:
- Set the `TERM` environment variable inside the terminal
Currently the terminal inherits the `TERM` variable from the parent
process. However this can cause issues with programs that rely on this
variable to make sure certain features are present. For example not
supporting backspaces making the terminal almost unusable.
Closes#22720
Release Notes:
- `ExpandExcerpts` (`shift+enter` by default) now expands all excerpts
that have selected text, rather than just excerpts that contain the end
of a selection.
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
|
[tree-sitter-python](https://redirect.github.com/tree-sitter/tree-sitter-python)
| workspace.dependencies | patch | `0.23.5` -> `0.23.6` |
---
### Release Notes
<details>
<summary>tree-sitter/tree-sitter-python (tree-sitter-python)</summary>
###
[`v0.23.6`](https://redirect.github.com/tree-sitter/tree-sitter-python/releases/tag/v0.23.6)
[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-python/compare/v0.23.5...v0.23.6)
**NOTE:** Download `tree-sitter-python.tar.xz` for the *complete* source
code.
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44NS4wIiwidXBkYXRlZEluVmVyIjoiMzkuODUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Closes#22655
A more detailed write-up for this change can be found in the issue
itself. Here, I'm just providing previews after the change. The preview
before the change can be found in the attached issue.
1. While selecting multiple entries, the last clicked entry should be
selected.
[a.webm](https://github.com/user-attachments/assets/2add69c3-82a9-4e45-92e8-366aaf9b298a)
2. When holding `Ctrl`/`Cmd` on an entry, there should be clear visual
feedback to indicate whether the entry is selected or marked.
[b.webm](https://github.com/user-attachments/assets/2cefb8aa-e7d0-4929-9efa-89a4329f428b)
3. When only one entry is marked, but it’s different from the selection,
operations should prioritize the selected entry. This let's you do quick
one-off actions without disrupting the marked state.
[c.webm](https://github.com/user-attachments/assets/8e7ae0c0-4387-49b9-9761-5d02a1c21a84)
4. When more than one entries are marked, operations should prioritize
the marked entries. If the selection differs from the marked entries, it
should not interfere with operations on the marked entries. This let's
you do actions on multiple marked entries without needing to adjust the
selection.
[d.webm](https://github.com/user-attachments/assets/165a74be-cbe9-48ac-b558-2562485ea224)
Release Notes:
- Improved project panel selection, copying, and deletion behavior, to
be more predictable.
Closes#22399
Currently, the target file is being trashed when trashing a symlink, and
the symlink remains intact. Symlinks are not handled separately yet, so
when `open` is used on a symlink, it gets resolved to the target file.
To fix this, we can get the file descriptor of the symlink by passing
`libc::O_PATH | libc::O_NOFOLLOW` flags to `open`, and then pass this
file descriptor to the existing `trash::trash_file` from `ashpd`.
However, this would result in an error because `ashpd` currently does
not support trashing symlink files. I have created an issue for it here:
[https://github.com/bilelmoussaoui/ashpd/issues/255](https://github.com/bilelmoussaoui/ashpd/issues/255).
For the time being, this PR partially fixes the issue by removing the
symlink without trashing so that the target file won't be affected. Once
the upstream bug is fixed, we can switch this remove action back to
trashing.
Release Notes:
- Fixed target file from being trashed when trashing symlink on Linux.
No issue, as the functionality is currently not being used in Zed. This
is more of a GPUI improvement.
Currently, `keyboard_layout` and `on_keyboard_layout_change` are already
handled on macOS. This PR implements the same for X11 and Wayland.
Linux supports up to 4 keyboard layout groups (e.g., Group 0: English
US, Group 1: Bulgarian, etc). On X11 and Wayland, `event` provides a new
active group, which maps to the `layout_index`. We already store keymap
state from where we can get the current `layout_index`. By comparing
them, we determine if the layout has changed.
X11:
<img
src="https://github.com/user-attachments/assets/b528db77-1ff2-4f17-aac5-7654837edeb9"
alt="x11" width="300px" />
Wayland:
<img
src="https://github.com/user-attachments/assets/2b4e2a30-b0f4-495c-96bb-7bca41365d56"
alt="wayland" width="300px" />
Release Notes:
- N/A
This is harmful for user experience and at best requires a user setting.
This was committed as part of
https://github.com/zed-industries/zed/pull/21739 however that change had
no relevant release notes and no relevant settings.
The issue #22343 shows how this can result in user experience
regression: deleting a text fragment can reinsert it back, and it's thus
unclear if the deletion has even worked. Maybe this can be reenabled in
some very restrictive setup, and put behind a setting, but it can't be
unconditional. Completions should activate when the user signals intent
of entering code - for example, if instead of `de` to delete a fragment,
I press `ce` to replace it, I would naturally expect inline completions
to show up.
Note: The linked PR added more code in vim crate to refresh inline
completions in normal mode. I'm keeping that code around in this commit,
so that this can be the minimal fix to the linked issue -- with the
assumption that maybe there's some way in the future to reenable this in
a subset of cases that don't result in confusing / broken UX. If that is
not true the code might need further cleanup. Let me know if you'd
rather see removal of those changes in this PR as well.
Closes#22343.
Release Notes:
- Fixes inline completions showing up in Vim normal mode.
`@attribute` is the very first query on the
https://zed.dev/docs/extensions/languages#syntax-highlighting captures
list, we should be using it! This PR changes the highlights queries for
HTML to use the `@attribute` capture instead of the `@property` capture
for `attribute_name` nodes.
Release Notes:
- N/A
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
The code we have assumes that when you run commands over ssh they run
in your home directory. This was not true in some cases, and broke SSH
remoting if you had `upload_binary_over_ssh` set.
To reproduce this use Coder and set the `dir` parameter.
Release Notes:
- Fixed SSH remoting in the case that ssh defaults to a non-$HOME
directory.
This PR adds some missing calls to clear the sub-collections in the
`ThreadStore` when we call `ThreadStore::drain` or `ThreadStore::clear`.
Release Notes:
- N/A
The existing code was causing us to constantly re-scan files when
anything changed in the project. Temporarily revert this as we're about
to rework this entire UI with the new primitives.
follow up to https://github.com/zed-industries/zed/pull/22329
Release Notes:
- N/A
---------
Co-authored-by: Cole <cole@zed.dev>
Based on the python https://github.com/zed-industries/zed/issues/21452
and PR https://github.com/zed-industries/zed/pull/22587
I found the same problem with go on windows.
Describe the bug / provide steps to reproduce it
Language server error: gopls
The system cannot find the file specified. (os error 2)
-- stderr--
[ERROR project::lsp_store] Failed to start language server "gopls": The
system cannot find the file specified. (os error 2)
[ERROR project::lsp_store] server stderr: ""
Environment
Windows 11
Go
Release Notes:
- Windows: Fixed `gopls` path construction on Windows 11.
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
These are more closely like default Emacs bindings.
I hope such small and minor changes didn't warrant a discussion in
advance.
Release Notes:
- Added Emacs bindings for creating a new window, closing a window, and
quitting zed entirely.
Added documentation explaining that clangd requires
`compile_commands.json` for proper functionality in both C and C++
projects. Includes instructions for generating the file using CMake.
This is related to
https://github.com/zed-industries/zed/discussions/6480
Release Notes:
- N/A
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
Release Notes:
- Added support for Google's Gemini 2.0 Flash experimental model.
Note:
Weirdly enough the model is slow on small talk responses like 'hi' (in
my tests) but very fast on things that need more tokens like 'write me a
snake game in python'. Likely an API problem.
TESTED ONLY ON WINDOWS! Would test further but don't have Linux
installed and don't have an Mac. Will likely work everywhere.
Why?:
I think Gemini 2.0 Flash is incredibly good model at coding and
following instructions. I think it would be nice to have it in the
editor. I did as minimal changes as possible while adding the model and
streaming validation. I think it's worth merging the commits as they
bring good improvements.
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This will allow the diagnostic popover to be displayed even if hovering
an invisible char.
Beyond that, it solves a rare `DiagnosticPopover` corner case:
* Supports moving the selection to a diagnostic when `GoToDiagnostic` is
done while hovering, based on `group_id`
* Provides Diagnostic values with `group_id: 0` providing information on
hover about invisible characters.
So, `GoToDiagnostic` would navigate to the very first error produced by
a language server. Really not a big deal of course.
Release Notes:
- N/A