Closes#25145
Now, upon pasting a file into the project panel after a copy or cut
operation, it will open in the editor. This buffer in the editor will be
in focus if there is no need to rename the newly pasted file. If a
rename is pending, it simply focuses on the rename editor.
https://github.com/user-attachments/assets/563b22ec-d1f6-4d92-af18-29d10620832c
Future: After the rename is completed, we can decide to focus on the
editor buffer, but this will be addressed in a follow-up, as there will
be multiple cases, such as renaming via a paste action where we want to
focus, and renaming directly via a rename action where we might not want
to focus.
Release Notes:
- Fixed scenario where pasting a file in the project panel after a
copy/cut operation wouldn't automatically open it in the editor.
A call to register_buffer_with_language_servers could nuke existing
snapshots, even when the buffer was already registered with a server.
Essentially, had we had the else branch in place, this would have been
detected.
Closes #ISSUE
Release Notes:
- Fixed Rust analyzer renames sometimes failing. (Preview only)
Closes #ISSUE
Fix `The package requires the Cargo feature called edition2024, but that
feature is not stabilized in this version of Cargo (1.81.0`
Release Notes:
- N/A
Closes: #25475
This PR makes it possible to stage uncommitted hunks that overlap but do
not coincide with an unstaged hunk.
Release Notes:
- Made it possible to stage hunks that are already partially staged
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Max <max@zed.dev>
Fixes a few state mismatches when changing providers and other settings
Release Notes:
- edit predictions: Fix mismatch between status bar settings and editor
control settings
- edit predictions: Turn off as soon as `edit_prediction_provider` is
set to `none`
---------
Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
https://developer.apple.com/forums/thread/718583 suggests that if you
staple a dmg, then the ticket is copied along with the app when you copy
it out of the dmg.
Closes #ISSUE
Release Notes:
- N/A
Changes:
- [x] Cursor at the start during yank operations on objects (`yip`,
`yab` etc).
- [x] Refactors this: Trim all leading and trailing whitespace from
inner multiline bracket selection.
- This leaves a nicely indented line when doing `ci{` `vi{d` etc
- [x] Checks for empty selection
- [x] Removed moving cursor to the start in visual bracket operations
This cleans up the previous implementation by providing a simpler check
in `surrounding_markers`, instead of calling a new function in
`expand_object`. No functionality was changed there except for handling
the empty selection and removing some cursor adjustments that should not
have been there after further testing.
Release Notes:
- N/A
Closes#25132
Release Notes:
- Fixed issues with `assistant: insert into editor` and `editor: copy` not inserting/copying the correct text inside of the assistant panel when selected using line-wise selection in Vim mode
---------
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
The rust-analyzer documentation has moved to mdbook. This fixes a few of
the links in the Rust documentation that point to the old manual.
Release Notes:
- N/A
#25333 added broader highlighting for identifiers, which broke the
generic query for attribute queries, resulting in these being
highlighted the same as identifiers.
To accomodate for this change, this PR updates the attribute matches to
be more specific.
Additionally, path matches in scoped identifiers are no longer
highlighted as attributes, as seen in the comparison screenshot. Can
revert this if requested.
| Zed Preview | <img width="750" alt="preview"
src="https://github.com/user-attachments/assets/2cd2e830-f510-4adf-8ce9-c41ed6fb157c"
/> |
| --- | --- |
| `main` | <img width="750" alt="main"
src="https://github.com/user-attachments/assets/cbe93186-9afd-4515-bc06-e519fd4ee6af"
/> |
| This PR | <img width="750" alt="pr"
src="https://github.com/user-attachments/assets/68270de8-e083-4fc6-a45e-25d3151acd87"
/> |
The generic match for `token_tree` is needed to recursively match
patterns like `#[cfg(any(test, feature = "test-support"))]` (or at least
I was unable to find a better query here). I tried to validate that this
does not break any other highlights and I believe it does not. However,
I might have still missed something.
Release Notes:
- N/A
Closes#24982
Release Notes:
- Fix `GoToDefinitionSplit` action bug where split wouldn't happen if
definition was in the same active editor
---------
Co-authored-by: Dylan <dylwil3@gmail.com>
Closes#16544
Release Notes:
- Added support for AWS Bedrock to the Assistant.
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Release Notes:
- Fix run indicators jumping when content changes
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Closes#19022
Release Notes:
- Fixes pessimal performance with the new git panel when a very large
number of files are untracked
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This PR removes the dependents of the `language_models` crate.
The following types have been moved from `language_models` to
`language_model` to facilitate this:
- `LlmApiToken`
- `RefreshLlmTokenListener`
- `MaxMonthlySpendReachedError`
- `PaymentRequiredError`
With this change only `zed` now depends on `language_models`.
Release Notes:
- N/A
This PR moves the `report_assistant_event` function from the
`language_models` crate to the `language_model` crate.
This allows us to drop some dependencies on `language_models`.
Release Notes:
- N/A
Should make it less likely that notorization fails when nathan changes
his passwords.
(though probably no less likly to fail beacuse apple forces us to resign
new agreements on the regular)
Release Notes:
- N/A
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
This PR removes the dependencies on the individual model provider crates
from the `language_model` crate.
The various conversion methods for converting a `LanguageModelRequest`
into its provider-specific request type have been inlined into the
various provider modules in the `language_models` crate.
The model providers we provide via Zed's cloud offering get to stay, for
now.
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/25406
### Problem
Users have been confused about requiring `alt-tab` instead of just `tab`
in cases where they don't have a completions menu open (see issue
above). When they insert a newline and are in leading whitespace, they
expect to be able to accept a prediction with just `tab`, but doing so
increasing the indentation instead.
This PR changes the behavior in so a modifier is only required if the
cursor isn't already at the right indentation level based on the
surrounding block. In this case, `tab` would increase the indentation
and the prediction would get interpolated, allowing the user to press
`tab` again to accept it.
We also updated the docs to break down this behavior:
https://github.com/zed-industries/zed/pull/25493
### Before
https://github.com/user-attachments/assets/91fe6193-dddd-43c1-8c26-0f4648bdc3fa
### After
https://github.com/user-attachments/assets/671041bf-bf22-46a3-8466-b19b3e7dd6a0
Release Notes:
- edit predictions: Do not require a modifier key when indentation is
correct according to its surrounding block
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This PR adds new `aws_http_client` and `bedrock` crates for supporting
AWS Bedrock.
Pulling out of https://github.com/zed-industries/zed/pull/21092 to make
it easier to land.
Release Notes:
- N/A
---------
Co-authored-by: Shardul Vaidya <cam.v737@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This function has grown a lot and it was getting really hard to
navigate. This PR splits it into smaller methods and moves it into
`Editor` with the rest of the edit prediction popovers' code.
I think there are opportunities to consolidate the many popovers we
have, but we'll do that separately.
Release Notes:
- N/A
Follow up to @0xtimsb's PR
https://github.com/zed-industries/zed/pull/22658.
- We're now changing the marked entry as we change the active buffer via
the pane tabs. If all tabs are closed, we clear all marked entries, too.
That means: if we have no open buffer, we don't have any highlighted
entry (i.e., background color) in the project panel.
- Also, now only marked entries have a different, more distinct
background color. The `is_active` state doesn't change an item's
background color anymore.
- This improves an edge case where you could have multiple entries
marked—where all of them would have a background color—and upon
unmarking one of them, that entry would continue to have a bg color.
Now, once you click or move your focus to unmark that entry, the bg
color goes away.
We discovered some new problems by doing these changes that we want to
fix:
1. 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.
2. If you mark multiple entries on the project panel and then click on
an open buffer, we still see all the multiple entries marked. This feels
incorrect. We should only allow one marked entry at a time.
These fixes should happen in follow up PRs, though.
Release Notes:
- Improved the scenario where there'd be a project panel entry
highlighted/marked even if there is no open buffer.
---------
Co-authored-by: smit <0xtimsb@gmail.com>
Closes#6701 (one of the top ranking issues as of writing)
Adds the ability to specify an HTTP/HTTPS proxy to route Copilot code
completion API requests through. This should fix copilot functionality
in restricted network environments (where such a proxy is required) but
also opens up the ability to point copilot code completion requests at
your own local LLM, using e.g.:
- https://github.com/jjleng/copilot-proxy
- https://github.com/bernardo-bruning/ollama-copilot/tree/master
External MITM-proxy tools permitting, this can serve as a stop-gap to
allow local LLM code completion in Zed until a proper OpenAI-compatible
local code completions provider is implemented. With this in mind, in
this PR I've added separate `settings.json` variables to configure a
proxy server _specific to the code completions provider_ instead of
using the global `proxy` setting, to allow for cases like this where we
_only_ want to proxy e.g. the Copilot requests, but not all outgoing
traffic from the application.
Currently, two new settings are added:
- `inline_completions.copilot.proxy`: Proxy server URL (HTTP and HTTPS
schemes supported)
- `inline_completions.copilot.proxy_no_verify`: Whether to disable
certificate verification through the proxy
Example:
```js
"features": {
"inline_completion_provider": "copilot"
},
"show_completions_on_input": true,
// New:
"inline_completions": {
"copilot": {
"proxy": "http://example.com:15432",
"proxy_no_verify": true
}
}
```
Release Notes:
- Added the ability to specify an HTTP/HTTPS proxy for Copilot.
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This PR changes the color used for `@variable` syntax highlights in the
Gruvbox themes to be less intense.
We now use the same color as `editor.foreground`.
| Language | Before | After |
| -------- |
-----------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------
|
| Rust | <img width="1410" alt="Screenshot 2025-02-24 at 10 08 41 AM"
src="https://github.com/user-attachments/assets/9a34964d-9fdc-4deb-ac30-4a1c9e6fb531"
/> | <img width="1410" alt="Screenshot 2025-02-24 at 10 55 18 AM"
src="https://github.com/user-attachments/assets/c245d0fd-28af-42b8-93f6-48cb14671d94"
/> |
| Python | <img width="1410" alt="Screenshot 2025-02-24 at 10 08 38 AM"
src="https://github.com/user-attachments/assets/8f8d111e-1d50-4229-a333-eb29b6ce9f4f"
/> | <img width="1410" alt="Screenshot 2025-02-24 at 10 55 20 AM"
src="https://github.com/user-attachments/assets/010b661e-dc9e-4ccb-8e52-ee10c8eb8342"
/> |
In #25333 and #25331 the highlight used for identifiers in Rust and
Python, respectively, was changed to `@variable`, which resulted in the
intense colors you see in the "Before" screenshots above.
We considered reverting the highlight query changes to those languages,
but after taking a look at our other languages, they already use similar
queries. Instead we're adjusting the theme to make these cases less
visually intense.
Release Notes:
- Gruvbox themes: Changed the color used for `@variable` syntax
highlights to be less intense.