This PR fixes a bug where using the project diff editor to restore hunks
from a file that's not open in its own buffer would cause those reverts
to be lost once the project diff drops its excerpts for that file.
The fix is to save the buffers after restoring them but before the
excerpts are (potentially) dropped. This is done for the project diff
editor only. If we fail to save the affected files, we add their buffers
to the active workspace, so that the reverted contents are preserved and
the user can try again to save them.
- [x] Get it working
- [x] Test
- [ ] ~~Clean up boolean soup~~
Co-authored-by: Max <max@zed.dev>
Release Notes:
- N/A
Currently back quotes ``` `` ``` not recognized as an object in vim
mode, so ```c i ` ```, ```d i ` ``` not working.
It seems to be a typo introduced in #22632 : The`DoubleQuotes` line was
doubled while the `BackQuotes` line was missing.
Release Notes:
- vim: Fixed back quotes ``` `` ``` not recognized as object.
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
In file search submit action, handle unwrap when there are no prior
selection.
Fix is for recently made commits, hence no release notes.
Release Notes:
- N/A
---------
Co-authored-by: Anthony Eid <anthony@zed.dev>
Closes#13881, and technically resolves#14927.
Release Notes:
- Added the ability to set the default Vim mode.
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This was originally a part of another PR, but I wanted to get the
refactoring in and shift focus to working on bugs.
This causes all git commands via the `Repository` entity to be
serialized, and allows us to return values other than `Result<()>`
Release Notes:
- N/A
This PR abstracts the communication layer for context servers, laying
the groundwork for supporting multiple transport mechanisms and taking
one step towards enabling remote servers.
Key changes centre around creating a new `Transport` trait with methods
for sending and receiving messages. I've implemented this trait for the
existing stdio-based communication, which is now encapsulated in a
`StdioTransport` struct. The `Client` struct has been refactored to use
this new `Transport` trait instead of directly managing stdin and
stdout.
The next steps will involve implementing an SSE + HTTP transport and
defining alternative context server settings for remote servers.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
* When staging in a buffer whose file has been deleted, do not save the
file
* Fix logic for writing to index when file is deleted
Release Notes:
- N/A
Like the real app, this one infinite loops if you have a diff in an
UnsharedFile.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
While looking at Biome LSP implementation I've noticed that they
register their rename capability dynamically, which we don't handle.
Release Notes:
- N/A
Release Notes:
- Fixed gutter highlights not matching diff hunks in multibuffers in
some cases
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Closes https://github.com/zed-industries/zed/issues/25377
Release Notes:
- Fixed a crash that could happen when typing in the assistant panel
with edit predictions enabled.
---------
Co-authored-by: Cole Miller <m@cole-miller.net>
This is a follow-up to https://github.com/zed-industries/zed/pull/25573.
We were still using the spend for a particular model when determining if
the user was over their maximum monthly spend instead of looking at the
usage across all models.
Release Notes:
- N/A
Release Notes:
- Improved Zed's handling of the following requests when the first
language server in language server settings for a given language is not
capable of handling them:
- Perform Rename
- Prepare Rename
- Document Highlights
- Find all references
- Go to implementation
- Go to definition
- Go to declaration
- Go to type definition
This PR fixes an issue introduced in #25530 that broke the notifications
that inform the user that a Zed update is required to continue using
edit prediction.
The issue is that the `Workspace` stored on the `Editor` is set _after_
the point we initialize Zeta, so capturing the `Workspace` at
construction time leads to it being `None`.
@ConradIrwin suggested that we could obtain the `Workspace` from the
`Window`, which does indeed do the trick.
I tested it both with and without this change by mocking the error
response, like so:
```rs
let response: Result<PredictEditsResponse, anyhow::Error> =
Err(anyhow!(ZedUpdateRequiredError {
minimum_version: SemanticVersion::new(0, 1, 0),
}));
```
Release Notes:
- N/A
Closes#25513
This PR handles case when `editor::SelectLargerSyntaxNode` expands
across excerpt boundaries and eventually crashes in multi buffer.
Release Notes:
- Fixed panic caused when `editor::SelectLargerSyntaxNode` is called
repetedly in multi buffer.
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
Closes#24571
Attempts to fix crash described in #24571 based on the panic trace
provided by the user. In short, the panic seemed to be caused by
attempting to read an `Entity<ContextEditor>` while it was being
updated. My assumption is that at some point in
`workspace.add_item_to_current_pane` the `ContextEditor` is read.
Therefore, I moved the workspace update outside of the ContextEditor
update, and replaced another `update` call with a `read` call to clean
it up and just in case that was actually the issue.
Release Notes:
- N/A
This PR updates the client-side checks to give Zed AI users access to
Claude 3.7 Sonnet.
Requires https://github.com/zed-industries/zed/pull/25576 to be
deployed.
Release Notes:
- Added support for Claude 3.7 Sonnet to Zed AI.
Add support for `stop_at_indent` option for MoveToBeginningOfLine and SelectToBeginningOfLine instead of mixing that with `stop_at_soft_wraps`.
Add emacs mapping for `alt-m` (`back-to-indentation`)
This PR adjusts the usage checks for the LLM free tier.
Previously we would limit the usage on a per-model basis, meaning the
user would get $10/mo free for each model they had access to.
We now have usage for all models count towards the free tier limit.
Release Notes:
- N/A
This is follow-up for https://github.com/zed-industries/zed/pull/25457
If you open a project without any open buffer, focus on the project
panel, navigate with arrows to a given entry, and hit space, you will
mark and open the file in the buffer. This is all correct. If you then
hit `escape` to clear the marked entries, nothing happens to the open
buffer, and the marked styled in the project panel entry go away. This
is all correct. The wrong behavior happens if you now hit space again on
the active entry. That should mark it, and thus change its styles, but
it doesn't happen. You just see it upon moving to a different entry with
arrow up/down.
Release Notes:
- Fixed project panel entry not being marked when triggering open action
via keyboard.
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>