Commit Graph

437 Commits

Author SHA1 Message Date
CharlesChen0823
a5b82b2bf3
project_panel: Add support for copy/paste between different worktrees (#15396)
Closes https://github.com/zed-industries/zed/issues/5362

Release Notes:

- Added a way to copy/cut-paste between different worktrees ([#5362](https://github.com/zed-industries/zed/issues/5362))
2024-08-28 11:35:18 +03:00
TheCub3
2f08a0a28c
Fix fifo files hanging the project wide search (#16039)
Release Notes:

- Fixed the issue related to the project wide search being stuck when
project contains .fifo files
- Might potentially solve the following issue
https://github.com/zed-industries/zed/issues/7360
2024-08-26 10:40:20 -06:00
Conrad Irwin
0fd5030297
Rename is_local to is_local_or_ssh (#16717)
Release Notes:

- N/A
2024-08-22 21:32:51 -06:00
Kajus
b7a66e4491
project_panel: Allow copying the paths of multiple selected files at once (#16558)
Closes #16555 

Release Notes:

- Improved the "Copy Path" and "Copy Relative Path" actions in the
project panel's context menu when selecting multiple files. All selected
files' paths will now be copied, separated by newlines.
2024-08-22 16:05:01 +02:00
Eli Perkins
a1438a49df
project_panel: Set scrollbar track background from theme (#16546)
This was previously using the value for the scrollbar border, instead of
the background.

I noticed this while trying out a new Zed theme.

Release Notes:

- Updated project panel scrollbar to respect the
`scrollbar.track.background` from the theme.

| Before | After |
| --- | ---- |
| <img width="281" alt="Screenshot 2024-08-20 at 2 46 23 PM"
src="https://github.com/user-attachments/assets/46d48e75-f472-4060-bcd7-9c2f7d97963d">
| <img width="280" alt="Screenshot 2024-08-20 at 2 46 37 PM"
src="https://github.com/user-attachments/assets/081038a4-4337-4c9f-9a95-93497003fb56">
|
2024-08-20 17:11:07 -04:00
Mikayla Maki
271e774713
Fix a bug where directories were not matching in the fuzzy matcher, when query contains the worktree root name (#16242)
Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
2024-08-14 12:43:00 -07:00
Richard Feldman
b1a581e81b
Copy/paste images into editors (Mac only) (#15782)
For future reference: WIP branch of copy/pasting a mixture of images and
text: https://github.com/zed-industries/zed/tree/copy-paste-images -
we'll come back to that one after landing this one.

Release Notes:

- You can now paste images into the Assistant Panel to include them as
context. Currently works only on Mac, and with Anthropic models. Future
support is planned for more models, operating systems, and image
clipboard operations.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Jason <jason@zed.dev>
Co-authored-by: Kyle <kylek@zed.dev>
2024-08-13 13:18:25 -04:00
Marshall Bowers
7b613cb169
Revert "Remove extra empty space for files when file icons are turned off (#16142) (#16167)
This PR reverts #16142, as it isn't what we want from a design
standpoint.

Having the file names misaligned from the folder names is not the
desired behavior:

<img width="243" alt="Screenshot 2024-08-13 at 11 16 53 AM"
src="https://github.com/user-attachments/assets/12914e89-2641-4932-96c2-00e89e56d6d7">

We can revisit when we have design bandwidth.

This reverts commit ee6a40137f.

Release Notes:

- Reverted #16142.
  - @JosephTLyons @notpeter for release notes curation
2024-08-13 11:37:29 -04:00
Uladzislau Kaminski
ee6a40137f
Remove extra empty space for files when file icons are turned off (#16142)
Closes #16073

<img width="269" alt="image" src="https://github.com/user-attachments/assets/88b7ff9f-17ec-4764-b37a-c218d7ad14ec">

Release Notes:

- Removed extra empty space for files when file icons are turned off ([#16073](https://github.com/zed-industries/zed/issues/16073))
2024-08-13 12:09:13 +03:00
Danilo Leal
a6f73c10d1
Fix symlink icon in the project panel (#15537)
Closes https://github.com/zed-industries/zed/issues/15481

---

Release Notes:

- N/A
2024-07-31 18:58:07 -03:00
Suhun Han
f124ca6474
project_panel: Double-click on blank space in project panel to create a new file (#15353)
Similar feature implemented in VSCode.


https://github.com/user-attachments/assets/ae250b5f-283c-4211-8947-d5d5703eb2d0


Release Notes:

- Added double-click to create a new file when clicking on blank space
in the project panel.
2024-07-29 18:33:13 +03:00
Piotr Osiewicz
c97d035eea
chore: Clean up allocs around project panel (#15422)
A drive-by I did when looking at something else.

Release Notes:

- N/A
2024-07-29 14:21:41 +02:00
Kirill Bulatov
243fb3562c
Auto fold directories in the project panel by default (#15273) 2024-07-26 15:26:20 +03:00
Marshall Bowers
298ca5ff1b
Prefer .map for conditionals with else conditions (#15118)
This PR updates instances where we were using `.when_else` and
`.when_else_some` to use `.map` with a conditional inside.

This allows us to avoid reinventing Rust's syntax for conditionals and
(IMO) makes the code easier to read.

Release Notes:

- N/A
2024-07-24 17:09:07 -04:00
Marshall Bowers
0297a42735
Use US English spelling of "behavior" and "customize" (#15117)
This PR fixes some instances that weren't using US English spellings of
"behavior" and "customize".

Release Notes:

- N/A
2024-07-24 16:36:01 -04:00
Max Brunsfeld
38e3182bef
Handle buffer diff base updates and file renames properly for SSH projects (#14989)
Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-07-23 11:32:37 -07:00
Bennet Bo Fenner
d0f52e90e6
assistant: Overhaul provider infrastructure (#14929)
<img width="624" alt="image"
src="https://github.com/user-attachments/assets/f492b0bd-14c3-49e2-b2ff-dc78e52b0815">

- [x] Correctly set custom model token count
- [x] How to count tokens for Gemini models?
- [x] Feature flag zed.dev provider
- [x] Figure out how to configure custom models
- [ ] Update docs

Release Notes:

- Added support for quickly switching between multiple language model
providers in the assistant panel

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-07-23 19:48:41 +02:00
CharlesChen0823
bac4a0428d
project_panel: Select the newly created file when copy/pasting a file (#14705)
Closes: #14361 

Release Notes:

- Improved project panel to select newly created file on copy/paste ([#14361](https://github.com/zed-industries/zed/issues/14361))
2024-07-18 17:26:33 +03:00
Conrad Irwin
62ab6e1a11
remoting: Allow Add/Remove remote folder (#14532)
Release Notes:

- remoting (alpha only): Allow add/remove folders to projects

---------

Co-authored-by: Max <max@zed.dev>
2024-07-16 12:01:59 -06:00
CharlesChen0823
ef20afa9a4
project_panel: Fixed open in split not working in project panel (#14535)
Release Notes:

- Fixed `cmd-double click` in project panel not opening a split view ([14465](https://github.com/zed-industries/zed/issues/14465))
2024-07-16 09:17:58 +03:00
Piotr Osiewicz
22900554d5
Project panel: Prevent scrollbar size from scaling with rem size (#14167)
The underlying container had width of 0.75 rem, which was equal to 12px
at default ui_font_size. However, with larger values of ui_font_size the
scrollbar would drift towards the center of a project panel, as the
scrollbar itself has a fixed width of 12 pixels. This commit moves
towards using a fixed width of 12px for scrollbar container. The
alternative was to make the scrollbar scale with ui_font_size, but that
isn't what the Editor scrollbar does, so I decided against it.



Release Notes:

- Fixed position of scrollbar in project panel with non-default
`ui_font_size` values.
2024-07-11 10:34:15 +02:00
francesco-gaglione
2dd486733b
Reveal in files instead of Finder (#13432)
fixes: #12776 

Release Notes:

- Renamed `editor::RevealInFinder` to `editor::RevealInFileManager`

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-07-09 11:54:14 -07:00
Piotr Osiewicz
6c0cb9eaa3
project panel: Respect y offset of a click-and-drag on a scrollbar (#13506)
Previously we've always snapped the scrollbar to the cursor position,
without regard for the position of the thumb.



Release Notes:

- N/A
2024-06-25 14:20:37 +02:00
Piotr Osiewicz
145cd798c0
project panel: Sticky dragging + do not move thumb when it's clicked (#13460)
/cc @mrnugget 
Release Notes:

- N/A
2024-06-24 12:51:32 +02:00
Piotr Osiewicz
89739d5874
project panel: Do not display scrollbar when entries do not overflow the panel (#13422)
/cc @JunkuiZhang 

Fixes
https://github.com/zed-industries/zed/pull/13358#issuecomment-2185032031

Release Notes:

- N/A
2024-06-23 18:24:21 +02:00
Piotr Osiewicz
d272e402ea
project panel: Add vertical scrollbar (#13358)
Fixes #4865
Release Notes:

- Added vertical scrollbar to project panel
2024-06-23 14:04:19 +02:00
Piotr Osiewicz
5dc54863a4
project panel: Improve performance in large projects (#13202)
In #12980 I've hoisted out creation of HashSet<PathInWorktree> out of
render_entry, which made us not create that hash set for each entry in a
worktree on each frame. In current nightly, we do it once per call to
render() on the whole worktree, which is better.

However, we can still reuse the hashed between the frames, if the
worktree has not changed. Once we calculate the hashset for a given
worktree state, we keep it around for as long as the state is valid for.
We calculate the HashSet lazily, as we may not necessarily need it if
the project panel is collapsed. In large worktrees, this helps keep the
CPU usage of the main thread low-ish.


Release Notes:

- Improved performance of project panel in large worktrees.
2024-06-18 15:09:52 +02:00
Kirill Bulatov
a8481099ca
Prefer the same order of entries inside outline and project panels, project search multi buffer (#13044)
Release Notes:

- N/A
2024-06-14 18:33:36 +03:00
Bennet Bo Fenner
0d8e6e6b12
assistant: Add diagnostics slash command (#12998)
This adds a `diagnostics` command to the assistant which allows to
inject compile errors/warnings into the context.

Release Notes:

- N/A
2024-06-14 17:14:50 +02:00
Bennet Bo Fenner
38d9ee3731
project panel: Support dropping files from finder (#12880)
Partially addresses #7386 



https://github.com/zed-industries/zed/assets/53836821/fc2e9864-40a8-4ada-ac95-a76a31c44437



Release Notes:

- Added support for dropping files from the finder onto the project
panel
2024-06-13 20:48:28 +02:00
Piotr Osiewicz
eb7b5a7131
project panel: Improve performance in worktrees with lots of files. (#12980)
When working on a repro for a different issue that involved a worktree
with lots of files (100k to be precise), UI became pretty unresponsive.
I pinned it down to us repeatedly preparing a HashSet of all paths in
the currently-scrolled-to worktree, once per each entry in the range
passed to for_each_visible_range (which is e.g. called during
rendering).

This PR makes that hashing happen just once per worktree. Additionally,
we no longer iterate over (potentially) all entries in a given worktree
when calculating the depth of a given entry.

Note that we could probably be smarter about this still; instead of
recalculating the hashset per each call to for_each_visible_entry, we
could do it whenever we update entries in the project panel. However,
with this PR I wanted to get a quick bang for a small buck; I'm pretty
confident in the change as is, it is relatively straightforward and
messing with worktree updates is more involved.



Release Notes:

- Improvement performance of project panel in large worktrees
2024-06-13 14:20:38 +02:00
Marshall Bowers
127b9ed857
project_panel: Don't show file icon during rename when file icons are otherwise hidden (#12910)
This PR fixes an instance where the file icon for a project panel entry
would be shown during a rename even when the `project_panel.file_icons`
setting was set to `false`.

Resolves #12905.

Release Notes:

- Fixed an issue where file icons were displayed in the project panel
during a rename even when `project_panel.file_icons` was set to `false`
([#12905](https://github.com/zed-industries/zed/issues/12905)).
2024-06-11 19:45:47 -04:00
Conrad Irwin
4e98c23463
Reconnect button for remote projects (#12669)
Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
2024-06-10 18:09:47 -06:00
Piotr Osiewicz
5f5e6b8616
workspace: Fix drag&dropping project panel entries into editor area (#12767)
Fixes #12733 

Release Notes:

- Fixed drag&dropping project panel entries into editor area & tab bar
2024-06-07 10:23:57 +02:00
Conrad Irwin
c7d56302d2
Always open the project panel for dev server projects (#12654)
Release Notes:

- N/A
2024-06-04 16:07:12 -06:00
Kirill Bulatov
47122a3115
Fix excluded file creation (#12620)
Fixes https://github.com/zed-industries/zed/issues/10890

* removes `unwrap()` that caused panics for text elements with no text,
remaining after edit state is cleared but project entries are not
updated, having the fake, "new entry"
* improves discoverability of the FS errors during file/directory
creation: now those are shown as workspace notifications
* stops printing anyhow backtraces in workspace notifications, printing
the more readable chain of contexts instead
* better indicates when new entries are created as excluded ones


Release Notes:

- Improve excluded entry creation workflow in the project panel
([10890](https://github.com/zed-industries/zed/issues/10890))
2024-06-04 10:31:43 +03:00
Nathan Sobo
5f98b9617a
Start on a database-backed prompt library (#12468)
Using the file system as a database seems like it's easy, but it's
actually a real pain. I'd like to use LMDB to store the prompts locally
so we have more control. We can always add an export option, but I want
the source of truth to be somewhere other than the file system.

So far, I have a PromptStore which is global to the application and can
be initialized on startup. Then there's a `PromptLibrary` which is
intended to be the root of a new kind of Zed window. I haven't actually
seen pixels yet, but I've sketched out the basics needed to create a new
prompt, save, etc.

Still lots to figure out but the foundations of being backed by a DB and
rendering in an independent window are in place.

/cc @iamnbutler @as-cii 

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2024-06-03 15:58:43 +02:00
Piotr Osiewicz
f3e6a0beab
project panel: Copy dragged entry when opt is pressed (#12348)
Partially fixes #5119 
TODO:
- [ ] Change cursor style to Copy when dragging an entry with opt
pressed.

Release Notes:

- Drag-and-dropping a project panel entry with opt modifier pressed now
copies the entry instead of moving it.
2024-05-29 12:34:58 +02:00
Piotr Osiewicz
36d0b71f27
project panel: adjust right border and make active entry more prominent when panel is not focused (#12420)
Release Notes:

- N/A
2024-05-29 11:34:59 +02:00
Kirill Bulatov
ef58509797
Show symlink tooltip on icon hover only (#12419)
Small follow-up of https://github.com/zed-industries/zed/pull/12263 

Release Notes:

- N/A
2024-05-29 12:05:53 +03:00
Piotr Osiewicz
ff9d6cc512
project panel: Remove active selection border when project panel is not focused (#12385)
This should make it less attention-grabbing.

Release Notes:

- N/A
2024-05-28 19:12:28 +02:00
Piotr Osiewicz
016a1444a7
project panel: Allow selecting multiple entries & add support for multiselect actions (#12363)
Fixes #4983 
TODO:
- [x] Improve release note.
- [x] Tests

Release Notes:

- Project panel now supports selecting multiple entries via cmd-click
and shift-click/shift-up/shift-down.
- Added support for handling multiple selected project panel entries to
Cut, Copy, Trash and Delete actions.
2024-05-28 15:51:23 +02:00
Patryck
a03813a471
Add icon and hover description for symlinks (#12263)
![image](https://github.com/zed-industries/zed/assets/12102857/c6ed8140-1256-4618-aa46-64e66becdf7e)


![Screenshot_20240524_201346](https://github.com/zed-industries/zed/assets/12102857/2577067c-4f61-486a-8613-14941555f5a8)

Resolves https://github.com/zed-industries/zed/issues/12142


Release Notes:

- Added in project panel an icon and hover description for symlinks ([12142](https://github.com/zed-industries/zed/issues/12142))
2024-05-28 09:50:58 +03:00
Nathan Sobo
e19339bc1d
Allow UI font weight to be assigned in settings (#12333)
Release Notes:

- Added the ability to configure the weight of your UI font in standard
CSS weight units from 0 to 900.
2024-05-26 23:06:58 -06:00
Avinash Thakur
461e7d00a6
Create a new directory when a new file ends with / (#12018)
Release Notes:

- Made project panel to create directories when renaming into paths ending with `/`
2024-05-24 23:46:19 +03:00
Elliot Thomas
b9697fb487
Enable manual worktree organization (#11504)
Release Notes:

- Preserve order of worktrees in project
([#10883](https://github.com/zed-industries/zed/issues/10883)).
- Enable drag-and-drop reordering for project worktrees

Note: worktree order is not synced during collaboration but guests can
reorder their own project panels.

![Reordering
worktrees](https://github.com/zed-industries/zed/assets/1347854/1c63d83c-5d4e-4b55-b840-bfbf32521b2a)

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2024-05-24 12:15:48 +03:00
d1y
14436a75b1
project panel: Update file icon when editing filename (#12078)
Before:


![before](https://github.com/zed-industries/zed/assets/45585937/1590586d-9d42-4d44-85fc-8e79499408b3)

After:


![after](https://github.com/zed-industries/zed/assets/45585937/c0fd1b2a-1ecf-4403-b74a-25c3c700f00d)

Release Notes:

- Update file icons during editing in project panel

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2024-05-21 18:34:01 +03:00
Thorsten Ball
a5b14de401
project panel: Add Duplicate action (#12081)
This fixes #5304 by adding a new Duplicate action to the project panel
context menu.

It really is implemented on top of copy&paste.



Release Notes:

- Added a Duplicate action to the project panel.
([#5304](https://github.com/zed-industries/zed/issues/5304)).



https://github.com/zed-industries/zed/assets/1185253/f0fa6a4b-f066-47df-84f0-257a049800d1
2024-05-21 09:58:10 +02:00
Conrad Irwin
1f611a9c90
Allow copy-pasting dev-server-token (#11992)
Release Notes:

- N/A
2024-05-17 16:41:46 -06:00
Piotr Osiewicz
9d10969906
chore: Fix refining_impl_trait lint occurences (#11979)
These show up when compiling Zed with latest nightly, which means that
we'd have to do it one or two Rust releases down the line.
Release Notes:

- N/A
2024-05-17 16:58:22 +02:00