Commit graph

17248 commits

Author SHA1 Message Date
Joseph T. Lyons
601090511b
Remove system_id from all events but editor_events (#18154)
Release Notes:

- N/A
2024-09-20 13:25:06 -04:00
Marshall Bowers
8bd624b5db
editor: Remove unneeded blank lines in rewrap test cases (#18152)
This PR removes some unneeded blank lines from some of the test cases
for `editor::Rewrap`.

These weren't meaningful to the test, and their presence could be
confusing.

Release Notes:

- N/A
2024-09-20 13:06:43 -04:00
jvmncs
9f6ff29a54
Reuse OpenAI low_speed_timeout setting for zed.dev provider (#18144)
Release Notes:

- N/A
2024-09-20 12:57:35 -04:00
狐狸
99bef27300
Add escape string highlights to JSON and JSONC files (#18138)
Release Notes:

- Added escape string highlights to JSON and JSONC files
2024-09-20 12:20:14 -04:00
Marshall Bowers
759646e0a3
editor: Improve rewrapping when working with comments at different indentation levels (#18146)
This PR improves the `editor::Rewrap` command when working with comments
that were not all at the same indentation level.

We now use a heuristic of finding the most common indentation level for
each line, using the deepest indent in the event of a tie.

It also removes an `.unwrap()` that would previously lead to a panic in
this case. Instead of unwrapping we now log an error to the logs and
skip rewrapping for that selection.

Release Notes:

- Improved the behavior of `editor: rewrap` when working with a
selection that contained comments at different indentation levels.
2024-09-20 11:45:03 -04:00
Marshall Bowers
ab1d466c5f
Remove replica_id from MultiBuffers (#18141)
This PR removes the `replica_id` field from the `MultiBuffer` struct.

We were only ever referencing this field to pass when constructing a
`MultiBuffer`, and never used it outside of that.

Release Notes:

- N/A
2024-09-20 10:48:27 -04:00
Richard Feldman
5f1046b3cd
Make evals handle failures more gracefully (#18082)
Now when an individual project eval fails, instead of panicking we add
it to a list of failures that we collect and report at the end (and make
the exit code nonzero).

Release Notes:

- N/A
2024-09-20 10:28:22 -04:00
Peter Tripp
d6c184b494
Detect 'MD' extension as Markdown (#18135)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
2024-09-20 09:23:11 -04:00
Thorsten Ball
90a12f5564
ssh remoting: Do not double-register LspAdapters (#18132)
This fixes the bug with hover tooltips appearing multiple times.

Turns out everytime we receive the `CreateLanguageServer` message we'd
add a new adapter but only have a single server running for all of them.

And we send a `CreateLanguageServer` message everytime you open a
buffer.

What this does is to only add a new adapter if it hasn't already been
registered, which is also what we do locally.


Release Notes:

- N/A
2024-09-20 14:35:45 +02:00
Thorsten Ball
97708fdf43
settings: Follow-up fix to show more errors (#18123)
The condition added in #18122 was too strict.


Release Notes:

- N/A
2024-09-20 11:10:19 +02:00
Thorsten Ball
ace4d5185d
settings: Show notification when user/project settings fail to parse (#18122)
Closes #16876

We only ever showed parsing errors, but not if something failed to
deserialize.

Basically, if you had a stray `,` somewhere, we'd show a notification
for user errors, but only squiggly lines if you had a `[]` instead of a
`{}`.

The squiggly lines would only show up when there were schema errors.

In the case of `formatter` settings, for example, if someone put in a
`{}` instead of `[]`, we'd never show anything.

With this change we always show a notification if parsing user or
project settings fails.

(Right now, the error message might still be bad, but that's a separate
change)


Release Notes:

- Added a notification to warn users if their user settings or
project-local settings failed to deserialize.

Demo:


https://github.com/user-attachments/assets/e5c48165-f2f7-4b5c-9c6d-6ea74f678683
2024-09-20 10:53:06 +02:00
Thorsten Ball
93730983dd
ssh remoting: Restore items/buffers when opening SSH project (#18083)
Demo:


https://github.com/user-attachments/assets/ab79ed0d-13a6-4ae7-8e76-6365fc322ec4



Release Notes:

- N/A

Co-authored-by: Bennet <bennet@zed.dev>
2024-09-20 08:04:49 +02:00
Stanislav Alekseev
8103ac12bf
ssh-remoting: Tidy up the code a bit after #18094 (#18102)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Release Notes:

- N/A
2024-09-19 21:36:50 -06:00
Antonio Scandurra
15b4130fa5
Introduce the ability to cycle between alternative inline assists (#18098)
Release Notes:

- Added a new `assistant.inline_alternatives` setting to configure
additional models that will be used to perform inline assists in
parallel.

---------

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Roy <roy@anthropic.com>
Co-authored-by: Adam <wolffiex@anthropic.com>
2024-09-19 17:50:00 -06:00
Nathan Sobo
ae34872f73
Fix prompt reloading in dev mode (#18095)
I think I nulled out the repo path to test the non dev mode case and
then forgot to reenable it 🤦‍♂️ .

Release Notes:

- N/A
2024-09-19 17:49:22 -06:00
Joseph T. Lyons
740803d745
Bump release_notes to v2 endpoint (#18108)
Partially addresses https://github.com/zed-industries/zed/issues/17527

<img width="1608" alt="SCR-20240919-rcik"
src="https://github.com/user-attachments/assets/25057731-7da6-4b36-b51b-021c67e8736b">

Release Notes:

- Enhanced the `auto update: view release notes locally` feature to
display release notes for each patch version associated with the
installed minor version.
2024-09-19 19:43:32 -04:00
Conrad Irwin
edf2c19250
Hide GPU problems from Slack (#18087)
Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-19 17:28:30 -04:00
Roy Williams
28a54ce122
Add diagnostic information to context of inline assistant (#18096)
Release Notes:

- Added Diagnostic information to inline assistant. This enables users
to just say "Fix this" and have the model know what the errors are.
2024-09-19 14:16:01 -06:00
Conrad Irwin
fbbf0393cb
ssh-remoting: Fix go to definition out of worktree (#18094)
Release Notes:

- ssh-remoting: Fixed go to definition outside of worktree

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-09-19 14:04:46 -06:00
David Soria Parra
00b1c81c9f
context_servers: Remove context_type from ResourceContent (#18097)
This is removed in the protocol

Release Notes:

- N/A
2024-09-19 15:51:48 -04:00
Joseph T. Lyons
27c1106fad
Fix bug where copying from assistant panel appends extra newline to clipboard (#18090)
Closes https://github.com/zed-industries/zed/issues/17661

Release Notes:

- Fixed a bug where copying from the assistant panel appended an
additional newline to the end of the clipboard contents.
2024-09-19 13:26:14 -04:00
Marshall Bowers
1fc391f696
Make Buffer::apply_ops infallible (#18089)
This PR makes the `Buffer::apply_ops` method infallible for
`text::Buffer` and `language::Buffer`.

We discovered that `text::Buffer::apply_ops` was only fallible due to
`apply_undo`, which didn't actually need to be fallible.

Release Notes:

- N/A
2024-09-19 13:14:15 -04:00
Nate Butler
8074fba76b
Update List to support UI Density (#18079)
Tracking issue: #18078

Improve UI Density support for List.

UI density is an unstable feature. You can read more about it in the
above issue!

| Before Normal - Before Dense - After Normal - After Dense |
|--------------------------------------------------------|
| ![Group
8](https://github.com/user-attachments/assets/bb896fcf-e4a6-4776-9308-1405906d2dbe)
| | | |

| Before Normal - Before Dense - After Normal - After Dense |
|--------------------------------------------------------|
| ![Group
9](https://github.com/user-attachments/assets/00815a1b-071b-4d02-96bc-36bf37b5ae8b)
|

Release Notes:

- N/A
2024-09-19 12:31:40 -04:00
Junkui Zhang
ac0d5d3152
windows: Fix regional indicator symbols broken (#18053)
Closes #18027


Unlike macOS, not all glyphs in color fonts are color glyphs, such as
`🇩🇪` in `Segoe UI Emoji`. As a result, attempting to retrieve color
information for these glyphs can cause an error, preventing the glyph
from being rendered.

This PR addresses the issue by setting the `is_emoji` variable to
`false` for non-color glyphs within color fonts.



Release Notes:

- N/A
2024-09-19 10:19:13 -06:00
Thorsten Ball
e9f2e72ff0
Workspace persistence for SSH projects (#17996)
TODOs:

- [x] Add tests to `workspace/src/persistence.rs`
- [x] Add a icon for ssh projects
- [x] Fix all `TODO` comments
- [x] Use `port` if it's passed in the ssh connection options

In next PRs:
- Make sure unsaved buffers are persisted/restored, along with other
items/layout
- Handle multiple paths/worktrees correctly


Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2024-09-19 17:51:28 +02:00
Joseph T Lyons
a944bb2f24 v0.155.x dev 2024-09-19 11:02:44 -04:00
Piotr Osiewicz
d2894ce9c9
pane: Do not autopin new item created as a neighbour of pinned tab (#18072)
When I used editor::NewFile or ProjectSearch from a pinned tab, the
resulting new tab would be pinned (and the last pinned tab would be
pushed off). This PR fixes it by always storing new tabs outside of the
pinned area if there's no destination index for the new tab.

Release Notes:

- Fixed tab bar not preserving pinned tab state when an editor::NewFile
action is executed.
2024-09-19 17:00:26 +02:00
CharlesChen0823
d91e62524f
assistant: Fix offset calculation not in char boundary (#18069)
Closes #17825 

Release Notes:

- N/A
2024-09-19 08:41:42 -06:00
Casey Watson
4338ff6be4
terminal: Add ability to open file from Git diff (#17446)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
- strip "a/" and "b/" prefix for potential paths.

Release Notes:

- Allow clicking on filepaths when using `git diff` inside the built-in
terminal
2024-09-19 15:01:28 +02:00
Thorsten Ball
23e1faa485
assistant panel: Fix copying code when trailing newline is missing (#18067)
Follow-up to #17853.

Apparently tree-sitter-md extends the range of the content node to
include the backticks when there is no newline.

Release Notes:

- N/A

Co-authored-by: Bennet <bennet@zed.dev>
2024-09-19 14:43:56 +02:00
thataboy
1723713dc2
Add ability to copy assistant code block to clipboard or insert into editor, without manual selection (#17853)
Some notes:

- You can put the cursor on the start or end line with triple backticks,
it doesn't actually have to be inside the block.
- Placing the cursor outside of a code block does nothing.
- Code blocks are determined by counting triple backticks pairs from
either start or end of buffer, and nothing else.
- If you manually select something, the selection takes precedence over
any code blocks.

Release Notes:

- Added the ability to copy surrounding code blocks in the assistant
panel into the clipboard, or inserting them directly into the editor,
without manually selecting. Place cursor anywhere in a code block
(marked by triple backticks) and use the `assistant::CopyCode` action
(`cmd-k c` / `ctrl-k c`) to copy to the clipboard, or the
`assistant::InsertIntoEditor` action (`cmd-<` / `ctrl-<`) to insert into
editor.

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Bennet <bennet@zed.dev>
2024-09-19 13:43:49 +02:00
Joseph T. Lyons
ca4980df02
Add system_id (#18040)
This PR adds `system_id` to telemetry, which is contained within a new
`global` database (accessible by any release channel of Zed on a single
system). This will help us get a more accurate understanding of user
count, instead of relying on `installationd_id`, which is different per
release channel. This doesn't solve the problem of a user with multiple
machines, but it gets us closer.

Release Notes:

- N/A
2024-09-19 07:20:27 -04:00
Danilo Leal
5e6d1814e5
Add stray UI tweaks on the task picker (#18059)
This PR adds tiny UI tweaks to the task picker. Just making sure it is
consistent with other pickers throughout Zed.

| Before | After |
|--------|--------|
| <img width="577" alt="Screenshot 2024-09-19 at 12 07 44 PM"
src="https://github.com/user-attachments/assets/c0f010a3-6e08-47ee-9997-9df2b203977c">
| <img width="577" alt="Screenshot 2024-09-19 at 12 07 09 PM"
src="https://github.com/user-attachments/assets/74baf191-4dd9-4765-b2fd-2390d4cb31c6">
|

Release Notes:

- N/A
2024-09-19 07:22:10 -03:00
hekmyr
c3f47b8040
vim: Fix increment/decrement command (#17644)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Improving vim increment and decrement command.

Closes: #16672

## Release Notes:

- vim: Improved edge-case handling for ctrl-a/ctrl-x

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-09-18 18:28:31 -06:00
Piotr Osiewicz
43e005e936
chore: Remove commented out code following 15446 (#18047)
Closes #ISSUE

Release Notes:

- N/A
2024-09-19 02:19:58 +02:00
Conrad Irwin
b43b800a54
More assistant events (#18032)
Release Notes:

- N/A
2024-09-18 18:07:39 -06:00
Marshall Bowers
eef44aff7f
extension: Re-enable test_extension_store_with_test_extension test (#18046)
The `test_extension_store_with_test_extension` test was disabled in
#15446, which got merged before re-enabling the test.

This PR re-enables that test.

Release Notes:

- N/A
2024-09-18 19:48:34 -04:00
Max Brunsfeld
106ca5076f
Fix leak of LMDB connection in semantic index (#17992)
Apparently, to close LMDB's file descriptors when using the `heed`
library, you need to explicitly call `prepare_for_closing`.

Release Notes:

- N/A

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Jason <jason@zed.dev>
2024-09-18 16:43:59 -07:00
Marshall Bowers
2cd9a88f53
Clean up after isahc_http_client introduction (#18045)
This PR does some clean up after #15446.

Release Notes:

- N/A
2024-09-18 19:39:15 -04:00
Piotr Osiewicz
2c8a6ee7cc
remote_server: Remove dependency on libssl and libcrypto (#15446)
Fixes: #15599
Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
2024-09-18 23:29:34 +02:00
Conrad Irwin
fb7a7a564a
ssh remoting: open settings locally (#18020)
Release Notes:

- ssh remoting: Open settings files in a non-remote window.
2024-09-18 11:15:54 -06:00
Conrad Irwin
826777a257
Tidy up LSP (#17973)
Release Notes:

- N/A
2024-09-18 11:15:46 -06:00
Danilo Leal
a7977aa64d
Tweak multibuffer header padding (#18011) 2024-09-18 17:18:56 +02:00
Marshall Bowers
373a17acf4
Add ability to display backgrounds for inlay hints (#18010)
This PR adds the ability to display backgrounds for inlay hints within
the editor.

This is controlled by the new `inlay_hints.show_background` setting.
This setting defaults to `false`.

To enable the setting, add the following to your `settings.json`:

```json
{
  "inlay_hints": {
    "enabled": true,
    "show_background": true
  }
}
```

When enabled, the inlay hint backgrounds will use the `hint.background`
color from the theme.

| Disabled | Enabled |
|
--------------------------------------------------------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------------------------------------------------------
|
| <img width="1624" alt="Screenshot 2024-09-17 at 4 21 53 PM"
src="https://github.com/user-attachments/assets/5534d09b-1e22-4c6f-9d82-314796ed7d22">
| <img width="1624" alt="Screenshot 2024-09-17 at 4 21 43 PM"
src="https://github.com/user-attachments/assets/6ec58cde-6115-4db4-be95-97c5f2f54b2d">
|

Related issues:

- #12485
- #17392

Release Notes:

- Added an `inlay_hints.show_background` setting to allow displaying
backgrounds for inlay hints in the editor.
  - This setting defaults to `false`.
- If enabled, the inlay hint backgrounds will use the `hint.background`
color from the theme.
2024-09-18 11:11:38 -04:00
Joseph T. Lyons
425c8f8c3e
Alphabetize actions (#18007)
Drive-by maintenance PR while working on another PR.

Release Notes:

- N/A
2024-09-18 10:42:17 -04:00
Danilo Leal
84f2e0ee37
Use buffer font in the terminal inline assistant (#18009)
This PR is a follow up to
https://github.com/zed-industries/zed/pull/17875.

Release Notes:

- N/A
2024-09-18 11:36:32 -03:00
Conrad Irwin
1a62396b1e
vim: Fix gv after indent/toggle comments (#17986)
Release Notes:

- vim: Fixed `gv` after > and < in visual mode
2024-09-18 08:19:06 -06:00
ensi
3ac201e448
gpui: Improve underline appearance (#17586) 2024-09-18 09:32:37 -04:00
Thorsten Ball
aae26ee33d
go: Fix tasks when running tests/benchs in packages (#17998)
Turns out that #17645 reintroduced another regression and didn't catch
all the regressions in #17108.

Releases Notes:

- Fixed Go tasks not working properly when running tests or benchmarks
in subfolders/packages.

Co-authored-by: Piotr <piotr@zed.dev>
2024-09-18 12:34:10 +02:00
Junkui Zhang
2699fa8d4a
windows: Fix tailwind-language-server (#17778)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Closes #17741

I'm not sure why, but ever since `tailwind` was upgraded to `0.24`,
there have been occasional errors indicating that the `.ps1` file could
not be found. After reviewing the `.ps1` script, it appears that it
simply starts the server using `node`. This PR directly using the method
from the script to start the server with `node`.


Co-authored-by: Anay <me@anayparaswani.dev>


Release Notes:

- N/A

---------

Co-authored-by: Anay <me@anayparaswani.dev>
2024-09-17 21:59:19 -06:00