Commit Graph

19624 Commits

Author SHA1 Message Date
Nate Butler
97512be378
Add wiring for UI density (#11260)
Note: You shouldn't use the `unstable.ui_density` setting – it is only
being added for testing and to enable new UI components to be built with
density in mind. Don't expect this to work well, or at all right now.

Adds some of the basic wiring we'll need to start scaling UI elements
throughout the app based on a desired density setting.

Release Notes:

- N/A
2024-05-01 14:28:52 -04:00
Conrad Irwin
0fce20d8da
More element arena (#11258)
Co-Authored-By: Mikayla <mikayla@zed.dev>

My Zed was running out with collab + chat + recent projects + two splits
on a large monitor


Release Notes:

- N/A

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-05-01 12:00:27 -06:00
Nate Butler
779f67506a
Assistant 2 temp icon (#11257)
Release Notes:

- N/A
2024-05-01 12:56:27 -04:00
Conrad Irwin
15eebb7fd2
blerg (#11254)
Release Notes:

- N/A
2024-05-01 10:22:44 -06:00
Conrad Irwin
e65a6fd8b6
Revert tyop (#11253)
Follup up from
https://github.com/zed-industries/zed/pull/11229#pullrequestreview-2033556336

Release Notes:

- N/A
2024-05-01 10:15:52 -06:00
Bennet Bo Fenner
8907d111e3
project panel: Adjust formatting of trash/delete action (#11252)
This PR removes a confusing quotation mark when trashing/deleting a
file, introduced in #10875.
Also makes it clear that the file is actually going into trash instead
of being deleted permanently

Before (trash):
<img width="266" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/f94a6257-62d0-4a3f-bc44-19e36bb28f67">

After (trash):
<img width="285" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/becb8143-06cf-4b5e-a52e-be2726df5955">

Before (delete):
<img width="263" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/e109a127-5f9c-4eeb-950e-4c4d5157061b">


After (delete):
<img width="260" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/246d0d94-e3d2-4279-84e2-74b313fe00a7">



Release Notes:

- Fixed formatting of prompt action when trashing/deleting a file
2024-05-01 18:07:19 +02:00
Joseph T. Lyons
32c9714a63 v0.135.x dev 2024-05-01 11:33:03 -04:00
Marshall Bowers
eb4ac7e5da
Suggest the SCSS extension for .scss files (#11249)
This PR adds a suggestion for the new [SCSS
extension](https://github.com/bajrangCoder/zed-scss) when `.scss` files
are opened.

Release Notes:

- Added a suggestion for the SCSS extension when `.scss` files are
opened.
2024-05-01 09:26:22 -04:00
Conrad Irwin
6b55a6f0e1
Retain run loop (#11241)
Contributes: #11168


https://developer.apple.com/documentation/corefoundation/1542428-cfrunloopgetcurrent
implies that we should be `CFRetain`ing the run loop.

Lets do that, and see if it reduces the number of crashes we see.

Release Notes:

- (maybe) Fix a rare crash in watching settings files.
2024-04-30 23:31:59 -06:00
Zorin FOSS
45cf101f6d
Add MimeType to open directory with zed (#11238)
Release Notes:

- open directory using context menu (Right click -> open with -> zed).
2024-04-30 21:56:45 -06:00
Hans
f39a24255c
Adjust the yss surrounds operator (#11212)
For #11084 In the case of an indentation in front of the current line,
it may also be necessary to deal with the start point of the selected
range


Release Notes:


- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-04-30 21:50:04 -06:00
Marshall Bowers
c9778a36ff
Use Elixir LS as the default language server for Elixir (#11234)
This PR adds `language_servers` settings for Elixir and HEEX to ensure
they both only use Elixir LS by default.

Eventually we'd like to have these provided by the Elixir extension, but
there are some outstanding questions on the design.

For now we can just use the built-in default settings to ensure a good
out-of-the-box experience for Elixir users.

Release Notes:

- N/A
2024-04-30 19:28:27 -04:00
Nathan Sobo
d1abbb1429
assistant2: Refine editing of previous messages (#11233)
This PR refines the UX of editing a previous message, including the
following:

- Focus the prev message body editor on double-click
- Restore previous body text on cancel
- Cancel pending completion upon submission of previous message
- Drive-by: Remove min height on composer editor

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <marshall@zed.dev>
2024-04-30 16:48:39 -06:00
Conrad Irwin
b18ca1585e
Fix merge conflict (#11232)
Release Notes:

- N/A
2024-04-30 16:26:10 -06:00
Conrad Irwin
93fbca4242
Bundle linux preview releases too (#11231)
Release Notes:

- Added preview builds for linux
2024-04-30 16:10:48 -06:00
Conrad Irwin
3752ed294d
open new buffer (#11203)
Release Notes:

- Allow creating new untitled buffers in remote projects

TODO:
- Add a Test
- Fix version number check
2024-04-30 16:09:43 -06:00
Conrad Irwin
28bcc95468
installer (#11229)
Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-04-30 16:01:07 -06:00
Marshall Bowers
d55b637b7e
assistant2: Fix the height of collapsed messages (#11230)
This PR fixes the height of collapsed messages, addressing the
associated TODO comment.

Release Notes:

- N/A
2024-04-30 17:44:51 -04:00
Marshall Bowers
f2a1226e18
assistant2: Setup storybook (#11228)
This PR sets up the `assistant2` crate with the storybook so that UI
elements can be iterated on in isolation.

To start, we have some stories for the `ChatMessage` component:

```sh
cargo run -p storybook -- components/assistant_chat_message
```

<img width="1233" alt="Screenshot 2024-04-30 at 5 20 03 PM"
src="https://github.com/zed-industries/zed/assets/1486634/510967ea-0e9b-4fa9-94fb-421ee74bcc45">

Release Notes:

- N/A
2024-04-30 17:33:32 -04:00
Marshall Bowers
96b1fc4650
assistant2: Align chat messages with composer (#11227)
This PR adds some additional spacing to the composer so it aligns with
the chat messages.

Release Notes:

- N/A
2024-04-30 17:00:23 -04:00
Conrad Irwin
1d4814e5b6
installer (#11224)
Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-04-30 14:25:12 -06:00
Conrad Irwin
cb7350174e
Don't allow dropping files on remote projects (#11218)
Release Notes:

- Fixed a panic when a remote participant dropped a local file on your
project
2024-04-30 14:24:47 -06:00
Marshall Bowers
f11a7811f3
assistant2: Use composer for editing inline messages (#11222)
This PR updates the assistant to render historical user messages the
same as ones from the assistant.

Double-clicking on a message will open a composer inline for editing.
Pressing `Esc` will cancel the edit.

We don't yet restore the previous state of the message upon canceling.

<img width="401" alt="Screenshot 2024-04-30 at 4 04 01 PM"
src="https://github.com/zed-industries/zed/assets/1486634/5f253fa8-6578-4054-be30-c495e326d700">

<img width="401" alt="Screenshot 2024-04-30 at 4 04 28 PM"
src="https://github.com/zed-industries/zed/assets/1486634/edf25cea-d97e-44d2-8772-3690eac017a4">


Release Notes:

- N/A
2024-04-30 16:12:20 -04:00
Marshall Bowers
e8ee0131f1
Remove unused assistant prompt (#11221)
This PR removes an unused assistant prompt.

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
2024-04-30 15:32:11 -04:00
Max Brunsfeld
38b9d5cc36
Fix some semantic index issues (#11216)
* [x] Fixed an issue where embeddings would be assigned incorrectly to
files if a subset of embedding batches failed
* [x] Added a command to debug which paths are present in the semantic
index
* [x] Determine why so many paths are often missing from the semantic
index
* we erroring out if an embedding batch contained multiple texts that
were the same, which can happen if a worktree contains multiple copies
of the same text (e.g. a license).

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Kyle <kylek@zed.dev>
Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2024-04-30 10:55:38 -07:00
Marshall Bowers
d01428e69c
assistant2: Add create buffer tool (#11219)
This PR adds a new tool to the `assistant2` crate that allows the
assistant to create a new buffer with some content.

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-04-30 13:43:25 -04:00
Piotr Osiewicz
ada2791fa3
editor: Move code actions menu closer to the indicator when it is deployed via click (#11214)
Before:

![image](https://github.com/zed-industries/zed/assets/24362066/98d633a7-c982-4522-b4dc-b944b70b8081)

After: 

![image](https://github.com/zed-industries/zed/assets/24362066/79931e12-0e6c-4ece-b734-5af7d02f7e50)

Release Notes:

- N/A
2024-04-30 18:51:20 +02:00
Marshall Bowers
713c314d67
Clean up doc comments on LanguageModelTool trait (#11217)
This PR cleans up the doc comments on the `LanguageModelTool` trait to
follow Rust documentation conventions.

Release Notes:

- N/A
2024-04-30 12:32:59 -04:00
Marshall Bowers
e3de440715
assistant2: Restructure tools in preparation for adding more (#11213)
This PR does a slight restructuring of how tools are defined in the
`assistant2` crate to make it more amenable to adding more tools in the
near future.

Release Notes:

- N/A
2024-04-30 11:12:44 -04:00
Thorsten Ball
d743c19fe2
Add script to package Linux binary into archive (#11165)
Release Notes:

- N/A
2024-04-30 14:56:48 +02:00
Thorsten Ball
73d0600ad2
project: Set completion to undocumented if text empty (#11207)
I think the previous code was missing a `return` in there because it
always overwrote the `completion.documentation` field, even if the
`text.is_empty()` is true.

Release Notes:

- N/A
2024-04-30 14:56:22 +02:00
Stanislav Alekseev
f96cab286c
Add avatar support for codeberg in git blame (#10991)
Release Notes:

- Added support for avatars in git blame for repositories hosted on
codeberg

<img width="1144" alt="Screenshot 2024-04-25 at 16 45 22"
src="https://github.com/zed-industries/zed/assets/43210583/d44770d8-44ea-4c6b-a1c0-ac2d1d49408f">

Questions:
- Should we move git stuff like `Commit`, `Author`, etc outside of
hosting-specific files (I don't think so, as other hostings can have
different stuff)
- Should we also add support for self hosted forgejo instances or should
it be a different PR?
2024-04-30 12:57:10 +02:00
Conrad Irwin
8152e0676f
Allow triggering preview and stable simultaneously (#11201)
Release Notes:


- N/A
2024-04-29 20:55:50 -06:00
Conrad Irwin
62c12cd549
Reduce frequency of workspace save (#11183)
Co-Authored-By: Mikayla <mikayla@zed.dev>

Release Notes:


- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-04-29 20:27:01 -06:00
Hans
4fad96b179
Add yss operation support for vim surrounds: (#11084)
The Motion::CurrentLine operation will contain the newline of the
current line, so we need to deal with this edge case



Release Notes:

- N/A
2024-04-29 19:38:14 -06:00
Conrad Irwin
ad44237467
Fix panic in SVG rendering (#11196)
Release Notes:

- Fixed a panic in SVG rendering
2024-04-29 19:03:37 -06:00
Danny Hua
bc736265be
support vim replace command with range (#10709)
Release Notes:

- Added support for line ranges in vim replace commands #9428


- not supporting anything other than bare line numbers right now
- ~need to figure out how to show range in question in search bar~
@ConradIrwin implemented showing a highlight of the selected range for a
short direction instead
- ~tests lol~
2024-04-29 18:49:30 -06:00
Conrad Irwin
0697b417a0
Hang diagnostics (#11190)
Release Notes:

- Added diagnostics for main-thread hangs on macOS. These are only
enabled if you've opted into diagnostics.

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-04-29 17:13:28 -07:00
Marshall Bowers
04cd8dd0f2
assistant2: Add the ability to collapse chat messages (#11194)
This PR adds the ability to collapse/uncollapse chat messages.

I think the spacing might be a little off with the collapsed
calculations, so we'll need to look into that.


https://github.com/zed-industries/zed/assets/1486634/4009c831-b44e-4b30-85ed-0266cb5b8a26

Release Notes:

- N/A
2024-04-29 19:25:58 -04:00
shimataro
ce643e6bef
Add Gentoo support to Linux dependency script (#11141)
This PR adds dependencies for Gentoo Linux.

Release Notes:

- N/A
2024-04-29 16:08:22 -07:00
apricotbucket28
6ab9c3c3ab
x11: HiDPI support (#11140)
Fixes https://github.com/zed-industries/zed/issues/11121

Release Notes:

- N/A
2024-04-29 16:07:54 -07:00
apricotbucket28
a765535557
wayland: Implement cursor-shape-v1 (#11106)
Fixes wrong cursor icons and sizes on KDE 6 (and possibly other
compositors)

Gnome still doesn't support this protocol, so to fix cursor settings
there we'll need to read `gsettings`.

Before:

![image](https://github.com/zed-industries/zed/assets/71973804/f0c3dc1b-2bed-43f7-b579-df6c9c0b547f)

After:

![image](https://github.com/zed-industries/zed/assets/71973804/6de639f9-653d-4896-80ca-b7c69641eded)


Release Notes:

- N/A
2024-04-29 16:06:18 -07:00
Marshall Bowers
089ea7852d
assistant2: Use ChatMessage component to render chat messages (#11193)
This PR updates the new assistant panel to use the `ChatMessage`
component to render its chat messages.

This also lays the foundation for collapsing the messages, though that
has yet to be wired up.

Adapted from the work on the `assistant-chat-ui` branch.

Release Notes:

- N/A
2024-04-29 18:47:16 -04:00
Marshall Bowers
ae650342ce
assistant2: Add headers to chat messages (#11191)
This PR adds headers to the chat messages in the new assistant panel.

Adapted from the work on the `assistant-chat-ui` branch.

Release Notes:

- N/A
2024-04-29 18:21:43 -04:00
Max Brunsfeld
1c09b69384
Pin message composer to the bottom of the new assistant panel (#11186)
Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Nate <nate@zed.dev>
Co-authored-by: Kyle <kylek@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-04-29 14:26:19 -07:00
Nate Butler
f842d19b0b
Remove extra space right of traffic lights on macOS (#11176)
This PR balances the left and right spacing around the traffic lights on
macOS.

Release Notes:

- Minor UI changes to the titlebar
2024-04-29 16:43:21 -04:00
Marshall Bowers
d633a0da78
gpui: Fix Global trait (#11187)
This PR restores the `Global` trait's status as a marker trait.

This was the original intent from #7095, when it was added, that had
been lost in #9777.

The purpose of the `Global` trait is to statically convey what types can
and can't be accessed as `Global` state, as well as provide a way of
restricting access to said globals.

For example, in the case of the `ThemeRegistry` we have a private
`GlobalThemeRegistry` that is marked as `Global`:
91b3c24ed3/crates/theme/src/registry.rs (L25-L34)

We're then able to permit reading the `ThemeRegistry` from the
`GlobalThemeRegistry` via a custom getter, while still restricting which
callers are able to mutate the global:
91b3c24ed3/crates/theme/src/registry.rs (L46-L61)

Release Notes:

- N/A
2024-04-29 16:37:37 -04:00
Piotr Osiewicz
91b3c24ed3
editor: Clear diagnostics when folding a range that contains it (#11167)
Fixes #4659 

Release Notes:

- Fixed active diagnostic in editor showing up when it's line is in a
folded range.
2024-04-29 20:50:14 +02:00
Bennet Bo Fenner
20625e98ad
preview tabs: Allow replacing preview tab when using code navigation (#10730)
This PR adds support for replacing the current preview tab when using
GoToDefinition. Previously a tab, that was navigated away from, was
converted into a permanent tab and the new tab was opened as preview.

Without `enable_preview_from_code_navigation`:


https://github.com/zed-industries/zed/assets/53836821/99840724-d6ff-4738-a9c4-ee71a0001634

With `enable_preview_from_code_navigation`:


https://github.com/zed-industries/zed/assets/53836821/8c60efcb-d597-40bf-b08b-13faf5a289b6

Note: In the future I would like to improve support for the navigation
history, because right now tabs that are not "normal" project items,
e.g. FindAllReferences cannot be reopened

Release Notes:

- Added support for replacing the current preview tab when using code
navigation (`enable_preview_from_code_navigation`)
2024-04-29 20:47:01 +02:00
Marshall Bowers
9ff847753e
Register ESLint as an available language server (#11178)
This PR adds the ability for the ESLint language server (`eslint`) to be
controlled by the `language_servers` setting.

Now in your settings you can indicate that the ESLint language server
should be used for a given language, even if that language does not have
the ESLint language server registered for it already:

```json
{
  "languages": {
    "My Language": {
      "language_servers": ["eslint", "..."]
    }
  }
}
```

Release Notes:

- N/A
2024-04-29 13:18:30 -04:00